HASHKIT_FNV1A_32(3)

πŸ’… HASHKIT_FNV1A_32 πŸ’…

ok so bestie, welcome to hashkit_fnv1a_32 β€” aka the page from libhashkit Documentation (that's the libmemcached-awesome manual, section 3, iykyk). this is your one-stop glow-up station for turning keys into hash values, and honestly? iconic. ✨


🌸 SYNOPSIS 🌸

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

#include <libhashkit-1.0/hashkit.h>

and compile + link it like this, fr fr:

Compile and link with -lhashkit

now the whole roster of hash girlies, all of them looking like this:

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 ✨

okay so what do these actually do. every single one of these functions takes a key and cooks up a hash value for you, just using a different algorithm each time. it's giving "same goal, different personality." πŸ’–

and here's the cute part β€” you can run them standalone, all by themselves, no drama. or they'll get picked automatically based on whichever algorithm you set with hashkit_set_function() or hashkit_set_distribution_function(). so basically they're fine doing their own thing, and also fine being the main character in a bigger setup. πŸŽ€

⚠️ heads up bestie: hashkit_hsieh(), hashkit_murmur() and hashkit_murmur3() are only available if the library was built with the appropriate flag enabled. if you didn't build it that way, these three are simply not showing up to the party. no flag, no function. periodt. πŸ’€

πŸ¦‹ RETURN VALUE πŸ¦‹

A 32-bit hash value.

like, that's it. that's the tea. β˜• one little 32-bit number, every single time. 🫢


🌈 SEE ALSO 🌈

go give these a read when you're done here, they're the rest of the friend group:


and that's the whole page, bestie!! πŸ’œ this was libmemcached-awesome, version 1.1, dated Jul 24, 2025 β€” so you know it's fresh. go hash something iconic. mwah. πŸ’…βœ¨πŸŒΈ

πŸ“¦ where this page comes from