HASHKIT_HSIEH(3)

πŸ’… HASHKIT_HSIEH β€” the libhashkit page, bestie edition

okay so welcome to hashkit_hsieh(3), part of the libmemcached-awesome manual, and honestly? it's giving "tiny page, huge power." sit down, grab a strawberry πŸ“, and let's get into it.


✨ NAME ✨

hashkit_hsieh β€” this is the libhashkit documentation entry, and she's here to explain the hash functions. no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

include the header, link the lib, that's the whole vibe:

#include <libhashkit-1.0/hashkit.h>

and yeah, you gotta Compile and link with -lhashkit. don't forget her, she gets lonely 😭

here's every function signature, verbatim, no edits, we respect the source:

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)

🌸 DESCRIPTION 🌸

so what do these actually do? these functions generate hash values from a key using a whole variety of algorithms. it's like a little friend group of hashers, each one with her own personality πŸ’–

you can use them standalone β€” just call one and go, main character energy β€” or they'll get used according to whichever algorithm you set with hashkit_set_function() or hashkit_set_distribution_function(). so they're flexible like that. obsessed.

⚠️ okay important caveat, listen up: hashkit_hsieh(), hashkit_murmur() and hashkit_murmur3() are only available if the library is built with the appropriate flag enabled. so if you're like "why is she not here 😭" β€” check your build flags, bestie. she's conditional. it's not you, it's the compile config.

πŸ‘‘ RETURN VALUE πŸ‘‘

a 32-bit hash value. that's it. that's the tea. uint32_t, every time. periodt. ✨


πŸŽ€ SEE ALSO πŸŽ€

go read her sisters, they ate:


and that's the whole page, fr fr 🫢 this was version 1.1, dated Jul 24, 2025, from the libmemcached-awesome crew. bye babes, go hash something πŸ’œ

πŸ“¦ where this page comes from