forked from phadej/igbinary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhash_function.h
31 lines (29 loc) · 1001 Bytes
/
hash_function.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
/*
+----------------------------------------------------------------------+
| See COPYING file for further copyright information |
+----------------------------------------------------------------------+
| Author: Oleg Grenrus <[email protected]> |
| See CREDITS for contributors |
+----------------------------------------------------------------------+
*/
#ifndef HASH_FUNCTION_H
#define HASH_FUNCTION_H
#ifdef PHP_WIN32
# include "ig_win32.h"
#else
# include <stdint.h> /* defines uint32_t etc */
#endif
/**
* Hash function
*
* At this moment lookup3 by Bob Jerkins
*
* @param key key
* @param length key length
* @param initval hash init val
* @return hash value of key
* @see http://burtleburtle.net/bob/hash/index.html
* @author Bob Jerkins <[email protected]>
*/
uint32_t hash_function(const void *key, size_t length, uint32_t initval);
#endif /* HASH_FUNCTION_H */