HASHKIT_FNV1_64(3)

πŸ’– HASHKIT_FNV1_64 πŸ’–

okay bestie, welcome to the libmemcached-awesome section 3 club πŸŽ€ this lil page lives under the name hashkit_fnv1_64 and it's your one-stop for making hash values out of keys. it's giving "libhashkit Documentation" energy and we are obsessed πŸ’…


✨ NAME ✨

hashkit_fnv1_64 β€” the libhashkit documentation moment, fr fr πŸ¦‹


🌸 SYNOPSIS 🌸

first things first, you gotta pull in the header and link the lib:

#include <libhashkit-1.0/hashkit.h>
       Compile and link with -lhashkit

and here's the whole squad of hash functions, exactly as they are, no cap:

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 look at them all, a whole little friend group 🫢 each one takes a key and a key_length and does its thing.


πŸ‘‘ DESCRIPTION πŸ‘‘

so here's the tea β˜• these functions generate hash values from a key using a variety of algorithms. you can use them standalone if you want, or they'll get used automatically according to whichever algorithm you set with hashkit_set_function() or hashkit_set_distribution_function(). main character behavior honestly πŸ’œ

and now the important caveat, listen up:

the hashkit_hsieh(), hashkit_murmur() and hashkit_murmur3() functions are only available if the library is built with the appropriate flag enabled. like, if you didn't build it with that flag, they're just... not there. periodt. πŸ’€

🌈 RETURN VALUE 🌈

a 32-bit hash value. that's it, that's the whole vibe ✨


πŸ¦‹ SEE ALSO πŸ¦‹

go be nosy, these are your next reads:


and that's the page bestie!! πŸŽ€ version 1.1, dated Jul 24, 2025, brought to you by libmemcached-awesome β€” slay, ate, no crumbs, iykyk πŸ’…πŸ’–πŸŒΈ

πŸ“¦ where this page comes from