36 #define HASH_FNV64_BASE ((uint64_t)14695981039346656037ULL) 37 #define HASH_FNV32_BASE ((uint32_t)2166136261UL) 39 #define HASH_FNV64_PRIME ((uint64_t)1099511628211ULL) 40 #define HASH_FNV32_PRIME ((uint32_t)16777619UL) uint64_t hash_fnv64a_buf(const void *buf, size_t len, uint64_t hval)
FNV-1a 64 bit hash over a buffer.
uint32_t hash_fnv32a_buf(const void *buf, size_t len, uint32_t hval)
FNV-1a 32 bit hash over a buffer.
uint64_t hash_fnv64_xorfold(uint64_t hash, int bits)
reduce a hash value to n bits.
uint64_t hash_fnv64a_strn(const char *str, size_t len, uint64_t hval)
FNV-1a 64 bit hash over a zero terminated string.
uint64_t hash_fnv64_retry(uint64_t hash, uint64_t limit)
reduce hash to be within 0 to limit-1.
uint32_t hash_fnv32a_strn(const char *str, size_t len, uint32_t hval)
FNV-1a 32 bit hash over a zero terminated string.
uint32_t hash_fnv32_retry(uint64_t hash, uint32_t limit)
reduce hash to be within 0 to limit-1.
uint32_t hash_fnv32_xorfold(uint32_t hash, int bits)
reduce a hash value to n bits.