diff options
| author | EuAndreh <eu@euandre.org> | 2024-06-06 07:54:48 -0300 |
|---|---|---|
| committer | EuAndreh <eu@euandre.org> | 2024-06-06 07:54:48 -0300 |
| commit | e2f983e1d1bb38fb44463b5485cbdcf8795c712c (patch) | |
| tree | ee4cd4a17fb5c0a42a0512e7915933a5e4d544ee | |
| parent | tests/: Use freeit() and do not use NULL as a boolean false value (diff) | |
| download | pindaiba-e2f983e1d1bb38fb44463b5485cbdcf8795c712c.tar.gz pindaiba-e2f983e1d1bb38fb44463b5485cbdcf8795c712c.tar.xz | |
src/hash.c: Update to correct latest siphashbs names
| -rw-r--r-- | src/hash.c | 6 | ||||
| -rw-r--r-- | tests/hash.c | 2 |
2 files changed, 4 insertions, 4 deletions
@@ -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(); } |
