1 #ifndef __LUNAIX_HASH_H
2 #define __LUNAIX_HASH_H
6 #define HASH_SIZE_BITS 32
9 strhash_32(unsigned char* str, uint32_t truncate_to);
12 * @brief Simple generic hash function
15 * https://elixir.bootlin.com/linux/v5.18.12/source/include/linux/hash.h#L60
21 hash_32(uint32_t val, uint32_t truncate_to)
23 return (val * 0x61C88647u) >> (HASH_SIZE_BITS - truncate_to);
26 #endif /* __LUNAIX_HASH_H */