DOKK / manpages / debian 12 / libmurmurhash-dev / lmmh_x86_32.3.en
LIBMURMURHASH(3) libmurmurhash manual LIBMURMURHASH(3)

libmurmurhash - non-cryptographic hash functions

#include <murmurhash.h>
void lmmh_x86_32(const void *addr, unsigned int len, uint32_t seed, uint32_t out[1]);
void lmmh_x86_128(const void *addr, unsigned int len, uint32_t seed, uint32_t out[4]);
void lmmh_x64_128(const void *addr, unsigned int len, uint32_t seed, uint64_t out[2]);

void MurmurHash3_x86_32(const void *data, int len, uint32_t seed, void *out);
void MurmurHash3_x86_128(const void *data, int len, uint32_t seed, void *out);
void MurmurHash3_x64_128(const void *data, int len, uint32_t seed, void *out);


uint32_t hash;
lmmh_x86_32(data, length, 0, &hash);
printf("%" PRIx32 "", hash);
Do the same, but with a wider hash.

uint64_t widehash[2]; lmmh_x64_128(data, length, 0, widehash); printf("%" PRIx64 "%" PRIx64 "", widehash[0], widehash[1]);

MurmurHash was created by Austin Appleby. PMurHash was written by Shane Day. Fabian Klötzl created libmurmurhash. All code is dedicated to the public domain.

The old API is problematic in that a negative length remains unchecked and the output parameter has very specific alignment requirements. Furthermore, the order of bytes in the hash may differ across architectures.

Please file a bug on GitHub <github.com/kloetzl/libmurmurhash> or send me a mail <fabian-libmurmurhash@kloetzl.info>.

2019-02-04 1