HASHKIT_MD5(3)
π HASHKIT_MD5 π
okay bestie so this is hashkit_md5(3) from the libmemcached-awesome fam, and it lives in the libhashkit girlie universe β¨ β that's the hashing side of the whole operation. come sit with me, we're gonna go through the whole thing π
β¨ 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 then here's the full lineup of functions, all of them built exactly 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)
likeβ¦ look at that consistency. every single one takes a const char *key and a size_t key_length, and every single one hands you back a uint32_t. iconic behavior fr fr π
πΈ DESCRIPTION πΈ
so what do these bad boys actually do? they take a key and crank out a hash value using a whole lil buffet of different algorithms π that's the whole vibe.
and here's the cute part β you can use these standalone, just call one and go, OR the library will reach for them on your behalf based on whichever algorithm you set with hashkit_set_function() or hashkit_set_distribution_function(). so they're like, both the main character and the supporting cast. range!! π¦
okay important tea though, and I'm not being dramatic:hashkit_hsieh(),hashkit_murmur()andhashkit_murmur3()are only available if the library is built with the appropriate flag enabled. like, they will not be there for you if that flag wasn't on when it got compiled. check before you get attached π
β RETURN VALUE β
a 32-bit hash value. that's it, that's the gift. uint32_t, every time, no surprises, no crumbs π«Ά
π SEE ALSO π
go read these next, bestie, they're the extended universe:
and that's the whole page!! this one's version 1.1, dated Jul 24, 2025, straight outta the libmemcached-awesome crew π mwah, go hash something, you're doing amazing sweetie πβ¨
π¦ 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