HASHKIT_FUNCTIONS(3)

πŸ’– HASHKIT_FUNCTIONS(3) πŸ’–

okay bestie, welcome to hashkit_functions from libmemcached-awesome β€” aka the libhashkit documentation, aka your new obsession. this is the 3 manual, so yes, we're in library land, and yes, we're gonna have fun with it. πŸ¦‹


✨ NAME ✨

hashkit_functions β€” the libhashkit documentation, babe. that's the whole vibe. πŸ’…


🌸 SYNOPSIS 🌸

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

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

and then here's the whole girl squad of hash functions, every single one, 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. iconic lineup fr fr. πŸ‘‘


πŸŽ€ DESCRIPTION πŸŽ€

so here's the tea, bestie: these functions generate hash values from a key, and they each do it with a different algorithm. it's giving "same goal, different paths," and honestly? we love that for them. 🌈

they're flexible like that β€” you can run them standalone, just you and your key, no drama. or they'll get used according to whichever algorithm you set with hashkit_set_function() or hashkit_set_distribution_function(). so they can do their own thing, or they can be picked by the group chat. either way, slay. ✨

now listen, important: hashkit_hsieh(), hashkit_murmur() and hashkit_murmur3() are only available if the library is built with the appropriate flag enabled. so if they're ghosting you, that's why. not personal. πŸ’€

🫢 RETURN VALUE 🫢

a 32-bit hash value. that's it, that's the answer. one (1) uint32_t. periodt. πŸ’…


πŸ’œ SEE ALSO πŸ’œ

go read these next, i'm obsessed:


okay that's the whole page, you ate it, no crumbs. πŸ“

this was version 1.1, dated Jul 24, 2025 β€” mwah, love you, go hash something. πŸ§šπŸ’–

πŸ“¦ where this page comes from