1f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com#pragma once
2f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com
3f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com#include "Types.h"
4f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com
5f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com#include "MurmurHash1.h"
6f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com#include "MurmurHash2.h"
7f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com#include "MurmurHash3.h"
8f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com
9f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com//----------
10f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com// These are _not_ hash functions (even though people tend to use crc32 as one...)
11f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com
12f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.comvoid sumhash               ( const void * key, int len, uint32_t seed, void * out );
13f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.comvoid sumhash32             ( const void * key, int len, uint32_t seed, void * out );
14f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com
15f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.comvoid DoNothingHash         ( const void * key, int len, uint32_t seed, void * out );
16f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.comvoid crc32                 ( const void * key, int len, uint32_t seed, void * out );
17f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com
18f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.comvoid randhash_32           ( const void * key, int len, uint32_t seed, void * out );
19f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.comvoid randhash_64           ( const void * key, int len, uint32_t seed, void * out );
20f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.comvoid randhash_128          ( const void * key, int len, uint32_t seed, void * out );
21f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com
22f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com//----------
23f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com// Cryptographic hashes
24f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com
25f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.comvoid md5_32                ( const void * key, int len, uint32_t seed, void * out );
26f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.comvoid sha1_32a              ( const void * key, int len, uint32_t seed, void * out );
27f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com
28f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com//----------
29f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com// General purpose hashes
30f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com
31f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.comvoid FNV                   ( const void * key, int len, uint32_t seed, void * out );
32f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.comvoid Bernstein             ( const void * key, int len, uint32_t seed, void * out );
33f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.comvoid SuperFastHash         ( const void * key, int len, uint32_t seed, void * out );
34f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.comvoid lookup3_test          ( const void * key, int len, uint32_t seed, void * out );
35f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.comvoid MurmurOAAT_test       ( const void * key, int len, uint32_t seed, void * out );
36f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.comvoid Crap8_test            ( const void * key, int len, uint32_t seed, void * out );
37f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.comvoid CityHash128_test      ( const void * key, int len, uint32_t seed, void * out );
38f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.comvoid CityHash64_test       ( const void * key, int len, uint32_t seed, void * out );
39f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com
40f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.comvoid SpookyHash32_test     ( const void * key, int len, uint32_t seed, void * out );
41f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.comvoid SpookyHash64_test     ( const void * key, int len, uint32_t seed, void * out );
42f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.comvoid SpookyHash128_test    ( const void * key, int len, uint32_t seed, void * out );
43f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com
44f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.comuint32_t MurmurOAAT ( const void * key, int len, uint32_t seed );
45f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com
46f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com//----------
47f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com// MurmurHash2
48f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com
49f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.comvoid MurmurHash2_test      ( const void * key, int len, uint32_t seed, void * out );
50f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.comvoid MurmurHash2A_test     ( const void * key, int len, uint32_t seed, void * out );
51f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com
52f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com//-----------------------------------------------------------------------------
53f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com// Test harnesses for Murmur1/2
54f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com
55f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.cominline void MurmurHash1_test ( const void * key, int len, uint32_t seed, void * out )
56f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com{
57f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com  *(uint32_t*)out = MurmurHash1(key,len,seed);
58f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com}
59f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com
60f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.cominline void MurmurHash2_test ( const void * key, int len, uint32_t seed, void * out )
61f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com{
62f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com  *(uint32_t*)out = MurmurHash2(key,len,seed);
63f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com}
64f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com
65f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.cominline void MurmurHash2A_test ( const void * key, int len, uint32_t seed, void * out )
66f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com{
67f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com  *(uint32_t*)out = MurmurHash2A(key,len,seed);
68f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com}
69f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com
70f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.cominline void MurmurHash64A_test ( const void * key, int len, uint32_t seed, void * out )
71f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com{
72f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com  *(uint64_t*)out = MurmurHash64A(key,len,seed);
73f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com}
74f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com
75f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.cominline void MurmurHash64B_test ( const void * key, int len, uint32_t seed, void * out )
76f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com{
77f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com  *(uint64_t*)out = MurmurHash64B(key,len,seed);
78f3b789787b93945c974e2cc517b7dc352b28354etanjent@gmail.com}
79