HASHKIT_FNV1A_64(3)
π HASHKIT_FNV1A_64 π
okay so bestie, welcome to hashkit_fnv1a_64 β straight out of the libmemcached-awesome manual, section 3. this is the libhashkit documentation page and it's lowkey a whole buffet of hash functions, so grab a snack π
β¨ SYNOPSIS β¨
first things first, you gotta pull in the header and link the library, no cap:
#include <libhashkit-1.0/hashkit.h>
Compile and link with -lhashkit
and here's every single signature, character for character, because we do NOT play with typos in this house π
uint32_t hashkit_default(const char *key, size_t key_length)
uint32_t hashkit_fnv1_64(const char *key, size_t key_length)
uint32_t hashkit_fnv1a_64(const char *key, size_t key_length)
uint32_t hashkit_fnv1_32(const char *key, size_t key_length)
uint32_t hashkit_fnv1a_32(const char *key, size_t key_length)
uint32_t hashkit_crc32(const char *key, size_t key_length)
uint32_t hashkit_hsieh(const char *key, size_t key_length)
uint32_t hashkit_murmur(const char *key, size_t key_length)
uint32_t hashkit_murmur3(const char *key, size_t key_length)
uint32_t hashkit_jenkins(const char *key, size_t key_length)
uint32_t hashkit_md5(const char *key, size_t key_length)
like. eleven of them. a whole squad π«Ά
πΈ DESCRIPTION πΈ
so what are these actually doing? they generate hash values from a key, and each one uses a different algorithm to do it. that's the vibe.
the way that you can use them:
- standalone β just call one directly, it's giving independent queen π
- automatically β whichever algorithm you picked with
hashkit_set_function()orhashkit_set_distribution_function()will be the one that gets used
ok important note bestie, listen up π βhashkit_hsieh(),hashkit_murmur()andhashkit_murmur3()are only available if the library is built with the appropriate flag enabled. so if you're out here calling them and getting nothing, it's not you, it's the build config. fr fr.
β RETURN VALUE β
every single one of these hands you back a 32-bit hash value. that's it, that's the tea β¨
π¦ SEE ALSO π¦
go read these too, they're iconic:
and that's the whole page, bestie π this was libmemcached-awesome version 1.1, dated Jul 24, 2025 β go hash something and slay ππ
π¦ where this page comes from
- fedora 43: libmemcached-awesome-devel 1.1.4-7.fc43 Β· BSD-3-Clause
- fedora 43: libmemcached-awesome-devel 1.1.4-7.fc43 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms