siphash.h (1138B)
1 // Copyright 2019 The BoringSSL Authors 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // https://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 #ifndef OPENSSL_HEADER_SIPHASH_H 16 #define OPENSSL_HEADER_SIPHASH_H 17 18 #include <openssl/base.h> // IWYU pragma: export 19 20 #if defined(__cplusplus) 21 extern "C" { 22 #endif 23 24 25 // SipHash is a fast, secure PRF that is often used for hash tables. 26 27 28 // SIPHASH_24 implements SipHash-2-4. See https://131002.net/siphash/siphash.pdf 29 OPENSSL_EXPORT uint64_t SIPHASH_24(const uint64_t key[2], const uint8_t *input, 30 size_t input_len); 31 32 33 #if defined(__cplusplus) 34 } // extern C 35 #endif 36 37 #endif // OPENSSL_HEADER_SIPHASH_H