From 36e259a6e00ae444210862eaeb256b899bf0ae23 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 20 Apr 2021 15:10:16 -0600 Subject: global: move siphash helper out of support Signed-off-by: Jason A. Donenfeld --- src/support.h | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'src/support.h') 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 -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 -- cgit v1.2.3-59-g8ed1b