---
name: "lmmh_x86_128"
section: "3"
platform: "linux"
package: "libmurmurhash-dev"
version: "1.6-1+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/murmurhash"
---

# lmmh\_x86\_128(3)

non-cryptographic hash functions

Part of [murmurhash(3)](/murmurhash/3.md).

## NAME

libmurmurhash - non-cryptographic hash functions

## SYNOPSIS

```
#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\]);**

### Deprecated API

```
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);
```

## DESCRIPTION

- LibMurmurHash provides the three variants of MurmurHash3 from the original source. The first parameter *addr* specifies the beginning of the data to be hashed in memory. The second parameter *len* gives the number of bytes to be hashed. The third parameter *seed* can be used to compute an alternative hash on the same data. Pass the location of the hash via the *out* parameter.

  ## EXAMPLE

- Compute the hash of *length* bytes starting from *data* and print the 32-bit sized hash value.

  ```
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]);
```

## AUTHORS

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.

## BUGS

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.

### Reporting Bugs

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

###
