2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

Add a case-insensitive option directly to siphash 2-4 implementation

Formerly, the isc_hash32() would have to change the key in a local copy
to make it case insensitive.  Change the isc_siphash24() and
isc_halfsiphash24() functions to lowercase the input directly when
reading it from the memory and converting the uint8_t * array to
64-bit (respectively 32-bit numbers).
This commit is contained in:
Ondřej Surý
2022-06-27 10:13:19 +02:00
parent de10d697ab
commit c14a4ac763
9 changed files with 140 additions and 75 deletions

View File

@@ -1196,7 +1196,7 @@ compute_cookie(ns_client_t *client, uint32_t when, uint32_t nonce,
UNREACHABLE();
}
isc_siphash24(secret, input, inputlen, digest);
isc_siphash24(secret, input, inputlen, true, digest);
isc_buffer_putmem(buf, digest, 8);
break;
}