From e2f983e1d1bb38fb44463b5485cbdcf8795c712c Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Thu, 6 Jun 2024 07:54:48 -0300 Subject: src/hash.c: Update to correct latest siphashbs names --- src/hash.c | 6 +++--- tests/hash.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hash.c b/src/hash.c index 4b397bd..67b3656 100644 --- a/src/hash.c +++ b/src/hash.c @@ -20,7 +20,7 @@ static volatile bool INITIALIZED = false; static uint8_t -SIPHASH_KEY[SIPHASH_KEY_LENGTH]; +HASH_KEY[SIPHASHBS_KEY_LENGTH]; static pthread_mutex_t SEED_MUTEX = PTHREAD_MUTEX_INITIALIZER; @@ -31,7 +31,7 @@ static int unsafe_init(void) { int rc = -1; - if (urandom_bytes(SIPHASH_KEY_LENGTH, &SIPHASH_KEY)) { + if (urandom_bytes(SIPHASHBS_KEY_LENGTH, &HASH_KEY)) { logerr("urandom_bytes()"); goto out; } @@ -100,5 +100,5 @@ hash( uint8_t out[HASH_OUTPUT_LENGTH] ) { ensure_initialized(); - siphashbs(SIPHASH_KEY, inlen, in, out); + siphashbs(HASH_KEY, inlen, in, out); } diff --git a/tests/hash.c b/tests/hash.c index 652b4fd..ebb39a0 100644 --- a/tests/hash.c +++ b/tests/hash.c @@ -13,7 +13,7 @@ test_HASH_OUTPUT_LENGTH(void) { { testing("Enforce we're always consistent with SipHash"); - assert(HASH_OUTPUT_LENGTH == SIPHASH_OUTPUT_LENGTH); + assert(HASH_OUTPUT_LENGTH == SIPHASHBS_OUTPUT_LENGTH); test_ok(); } -- cgit v1.2.3