-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGeneralHashFunctions.h
44 lines (33 loc) · 1.85 KB
/
GeneralHashFunctions.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
**************************************************************************
* *
* General Purpose Hash Function Algorithms Library *
* *
* Author: Arash Partow - 2002 *
* URL: http://www.partow.net *
* URL: http://www.partow.net/programming/hashfunctions/index.html *
* *
* Copyright notice: *
* Free use of the General Purpose Hash Function Algorithms Library is *
* permitted under the guidelines and in accordance with the most current *
* version of the Common Public License. *
* http://www.opensource.org/licenses/cpl1.0.php *
* *
**************************************************************************
*/
#ifndef INCLUDE_GENERALHASHFUNCTION_C_H
#define INCLUDE_GENERALHASHFUNCTION_C_H
#include <stdio.h>
typedef unsigned int (*hash_function)(char*, unsigned int len);
unsigned int RSHash (char* str, unsigned int len);
unsigned int JSHash (char* str, unsigned int len);
unsigned int PJWHash (char* str, unsigned int len);
unsigned int ELFHash (char* str, unsigned int len);
unsigned int BKDRHash(char* str, unsigned int len);
unsigned int SDBMHash(char* str, unsigned int len);
unsigned int DJBHash (char* str, unsigned int len);
unsigned int DEKHash (char* str, unsigned int len);
unsigned int BPHash (char* str, unsigned int len);
unsigned int FNVHash (char* str, unsigned int len);
unsigned int APHash (char* str, unsigned int len);
#endif