Implement incremental version of SipHash 2-4 and HalfSipHash 2-4

When inserting items into hashtables (hashmaps), we might have a
fragmented key (as an example we might want to hash DNS name + class +
type).  We either need to construct continuous key in the memory and
then hash it en bloc, or incremental hashing is required.

This incremental version of SipHash 2-4 algorithm is the first building
block.

As SipHash 2-4 is often used in the hot paths, I've turned the
implementation into header-only version in the process.
This commit is contained in:
Ondřej Surý
2023-09-08 17:22:05 +02:00
parent 9df9296b7a
commit 4dd49ac528
4 changed files with 424 additions and 241 deletions

View File

@@ -182,7 +182,6 @@ libisc_la_SOURCES = \
safe.c \
serial.c \
signal.c \
siphash.c \
sockaddr.c \
stats.c \
stdio.c \