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