Loading...
Searching...
No Matches
Murmurhash

Hash calculation using murmurhash algorithm. More...

## Functions

static uint32_t | ec_murmurhash_rotl32 (uint32_t x, int8_t r)
| Hash rotation.
static uint32_t | ec_murmurhash3_add32 (uint32_t h, uint32_t data)
| Add 32-bit to the hash.
static uint32_t | ec_murmurhash3_mix32 (uint32_t h)
| Intermediate mix.
static uint32_t | ec_murmurhash3_fmix32 (uint32_t h)
| Final mix: force all bits of a hash block to avalanche.
uint32_t | ec_murmurhash3 (const void *key, int len, uint32_t seed)
| Calculate a 32-bit murmurhash3.

## Detailed Description

Hash calculation using murmurhash algorithm.

MurmurHash3 is a hash implementation that was written by Austin Appleby, and is placed in the public domain. The author hereby disclaims copyright to this source code.

## Function Documentation

## ec_murmurhash_rotl32()

uint32_t ec_murmurhash_rotl32 | ( | uint32_t | x,
|  | int8_t | r )

inline static

Hash rotation.

Definition at line 21 of file murmurhash.h.

## ec_murmurhash3_add32()

uint32_t ec_murmurhash3_add32 | ( | uint32_t | h,
|  | uint32_t | data )

inline static

Add 32-bit to the hash.

Definition at line 27 of file murmurhash.h.

## ec_murmurhash3_mix32()

uint32_t ec_murmurhash3_mix32 | ( | uint32_t | h | ) |

inline static

Intermediate mix.

Definition at line 37 of file murmurhash.h.

## ec_murmurhash3_fmix32()

uint32_t ec_murmurhash3_fmix32 | ( | uint32_t | h | ) |

inline static

Final mix: force all bits of a hash block to avalanche.

Definition at line 45 of file murmurhash.h.

## ec_murmurhash3()

uint32_t ec_murmurhash3 | ( | const void * | key,
|  | int | len,
|  | uint32_t | seed )

Calculate a 32-bit murmurhash3.

Parameters

  key | The key (the unaligned variable-length array of bytes).
  len | The length of the key, counting by bytes.
  seed | Can be any 4-byte value initialization value.

Returns
  A 32-bit hash.