data-structures-c
Loading...
Searching...
No Matches
murmurhash.h File Reference

Murmur3 hash hashing function. More...

#include <stdint.h>
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Functions

static uint32_t murmur3_32 (const uint8_t *key_ptr, const uint32_t len, const uint32_t seed)
 Get the Murmur3 (32-bit) hash of a string of bytes.
 

Detailed Description

Murmur3 hash hashing function.

Note
Murmur3 hash is not a cryptographic hashing function.

Original Source: http://code.google.com/p/smhasher/source/browse/trunk/MurmurHash3.cpp

Source used: https://en.wikipedia.org/wiki/MurmurHash#Algorithm

MurmurHash3 was written by Austin Appleby, and is placed in the public domain.

Function Documentation

◆ murmur3_32()

static uint32_t murmur3_32 ( const uint8_t * key_ptr,
const uint32_t len,
const uint32_t seed )
inlinestatic

Get the Murmur3 (32-bit) hash of a string of bytes.

Parameters
[in]key_ptrPointer to the string of bytes.
[in]lenNumber of bytes.
[in]seedA seed, for whom matched with a given key, makes the hash function produce the same hash for the key.
Returns
A uint32_t-sized hash of the bytes.