LibCDS
hash.h
Go to the documentation of this file.
1 /**
2  * @file hash.h The collection of well-known hash functions.
3  */
4 
5 #ifndef _HASH_H_
6 #define _HASH_H_
7 
8 #include "../util.h"
9 
10 
11 /*-------------------------------------------------------*
12  * Non-cryptographic hash function *
13  *-------------------------------------------------------*/
14 /**
15  * @brief Google MurMur hash proposed by Austin Appleby in 2008.
16  *
17  * This is the version 3 MurMur implementation to yield 32 bit hash value.
18  * https://code.google.com/p/smhasher/wiki/MurmurHash3
19  *
20  * @param key The designated key
21  * @param size Size of the data pointed by the key in bytes
22  *
23  * @note The key should be the pointer to the data you plan to hash for.
24  */
25 uint32_t HashMurMur32(Key key, size_t size);
26 
27 /**
28  * @brief Hash function proposed by Bob Jenkins in 1997.
29  *
30  * @param key The designated key
31  * @param size Size of the data pointed by the key in bytes
32  *
33  * @note The key should be the pointer to the data you plan to hash for.
34  */
35 uint32_t HashJenkins(Key key, size_t size);
36 
37 #endif
uint32_t HashMurMur32(Key key, size_t size)
Google MurMur hash proposed by Austin Appleby in 2008.
uint32_t HashJenkins(Key key, size_t size)
Hash function proposed by Bob Jenkins in 1997.