1*8f76bb7dSCy Schubert /* 2*8f76bb7dSCy Schubert * util/siphash.h - header for SipHash reference C implementation. 3*8f76bb7dSCy Schubert * 4*8f76bb7dSCy Schubert * Copyright (c) 2023, NLnet Labs. All rights reserved. 5*8f76bb7dSCy Schubert * 6*8f76bb7dSCy Schubert * This software is open source. 7*8f76bb7dSCy Schubert * 8*8f76bb7dSCy Schubert * Redistribution and use in source and binary forms, with or without 9*8f76bb7dSCy Schubert * modification, are permitted provided that the following conditions 10*8f76bb7dSCy Schubert * are met: 11*8f76bb7dSCy Schubert * 12*8f76bb7dSCy Schubert * Redistributions of source code must retain the above copyright notice, 13*8f76bb7dSCy Schubert * this list of conditions and the following disclaimer. 14*8f76bb7dSCy Schubert * 15*8f76bb7dSCy Schubert * Redistributions in binary form must reproduce the above copyright notice, 16*8f76bb7dSCy Schubert * this list of conditions and the following disclaimer in the documentation 17*8f76bb7dSCy Schubert * and/or other materials provided with the distribution. 18*8f76bb7dSCy Schubert * 19*8f76bb7dSCy Schubert * Neither the name of the NLNET LABS nor the names of its contributors may 20*8f76bb7dSCy Schubert * be used to endorse or promote products derived from this software without 21*8f76bb7dSCy Schubert * specific prior written permission. 22*8f76bb7dSCy Schubert * 23*8f76bb7dSCy Schubert * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 24*8f76bb7dSCy Schubert * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 25*8f76bb7dSCy Schubert * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 26*8f76bb7dSCy Schubert * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 27*8f76bb7dSCy Schubert * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 28*8f76bb7dSCy Schubert * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 29*8f76bb7dSCy Schubert * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 30*8f76bb7dSCy Schubert * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 31*8f76bb7dSCy Schubert * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 32*8f76bb7dSCy Schubert * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 33*8f76bb7dSCy Schubert * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34*8f76bb7dSCy Schubert */ 35*8f76bb7dSCy Schubert /** 36*8f76bb7dSCy Schubert * \file 37*8f76bb7dSCy Schubert * Contains the SipHash reference C implementation. 38*8f76bb7dSCy Schubert */ 39*8f76bb7dSCy Schubert #ifndef UTIL_SIPHASH_H 40*8f76bb7dSCy Schubert #define UTIL_SIPHASH_H 41*8f76bb7dSCy Schubert int siphash(const uint8_t *in, const size_t inlen, const uint8_t *k, 42*8f76bb7dSCy Schubert uint8_t *out, const size_t outlen); 43*8f76bb7dSCy Schubert #endif /* UTIL_SIPHASH_H */ 44