diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2021-04-20 15:10:16 -0600 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2021-04-20 15:10:16 -0600 |
commit | 36e259a6e00ae444210862eaeb256b899bf0ae23 (patch) | |
tree | 03cbd58d496d4e1a82cbf6ec90b9afe036771310 /src/support.h | |
parent | TODO: add a few things (diff) | |
download | wireguard-freebsd-36e259a6e00ae444210862eaeb256b899bf0ae23.tar.xz wireguard-freebsd-36e259a6e00ae444210862eaeb256b899bf0ae23.zip |
global: move siphash helper out of support
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/support.h')
-rw-r--r-- | src/support.h | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/support.h b/src/support.h index 16231a6..041ffc3 100644 --- a/src/support.h +++ b/src/support.h @@ -45,28 +45,6 @@ MALLOC_DECLARE(M_WG); -#include <crypto/siphash/siphash.h> -typedef struct { - uint64_t k0; - uint64_t k1; -} SIPHASH_KEY; - -static inline uint64_t -siphash24(const SIPHASH_KEY *key, const void *src, size_t len) -{ - SIPHASH_CTX ctx; - - return (SipHashX(&ctx, 2, 4, (const uint8_t *)key, src, len)); -} - -static inline uint64_t -siphash13(const SIPHASH_KEY *key, const void *src, size_t len) -{ - SIPHASH_CTX ctx; - - return (SipHashX(&ctx, 1, 3, (const uint8_t *)key, src, len)); -} - #ifndef ARRAY_SIZE #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) #endif |