Fix --disable-assert, lp:829810
[awesomized/libmemcached] / libhashkit / algorithm.h
1 /* HashKit
2 * Copyright (C) 2009 Brian Aker
3 * All rights reserved.
4 *
5 * Use and distribution licensed under the BSD license. See
6 * the COPYING file in the parent directory for full text.
7 */
8
9 /**
10 * @file
11 * @brief HashKit Header
12 */
13
14 #pragma once
15
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19
20 HASHKIT_API
21 uint32_t libhashkit_one_at_a_time(const char *key, size_t key_length);
22
23 HASHKIT_API
24 uint32_t libhashkit_fnv1_64(const char *key, size_t key_length);
25
26 HASHKIT_API
27 uint32_t libhashkit_fnv1a_64(const char *key, size_t key_length);
28
29 HASHKIT_API
30 uint32_t libhashkit_fnv1_32(const char *key, size_t key_length);
31
32 HASHKIT_API
33 uint32_t libhashkit_fnv1a_32(const char *key, size_t key_length);
34
35 HASHKIT_API
36 uint32_t libhashkit_crc32(const char *key, size_t key_length);
37
38 #ifdef HAVE_HSIEH_HASH
39 HASHKIT_API
40 uint32_t libhashkit_hsieh(const char *key, size_t key_length);
41 #endif
42
43 #ifdef HAVE_MURMUR_HASH
44 HASHKIT_API
45 uint32_t libhashkit_murmur(const char *key, size_t key_length);
46 #endif
47
48 HASHKIT_API
49 uint32_t libhashkit_jenkins(const char *key, size_t key_length);
50
51 HASHKIT_API
52 uint32_t libhashkit_md5(const char *key, size_t key_length);
53
54 HASHKIT_LOCAL
55 uint32_t hashkit_one_at_a_time(const char *key, size_t key_length, void *context);
56
57 HASHKIT_LOCAL
58 uint32_t hashkit_fnv1_64(const char *key, size_t key_length, void *context);
59
60 HASHKIT_LOCAL
61 uint32_t hashkit_fnv1a_64(const char *key, size_t key_length, void *context);
62
63 HASHKIT_LOCAL
64 uint32_t hashkit_fnv1_32(const char *key, size_t key_length, void *context);
65
66 HASHKIT_LOCAL
67 uint32_t hashkit_fnv1a_32(const char *key, size_t key_length, void *context);
68
69 HASHKIT_LOCAL
70 uint32_t hashkit_crc32(const char *key, size_t key_length, void *context);
71
72 #ifdef HAVE_HSIEH_HASH
73 HASHKIT_LOCAL
74 uint32_t hashkit_hsieh(const char *key, size_t key_length, void *context);
75 #endif
76
77 #ifdef HAVE_MURMUR_HASH
78 HASHKIT_LOCAL
79 uint32_t hashkit_murmur(const char *key, size_t key_length, void *context);
80 #endif
81
82 HASHKIT_LOCAL
83 uint32_t hashkit_jenkins(const char *key, size_t key_length, void *context);
84
85 HASHKIT_LOCAL
86 uint32_t hashkit_md5(const char *key, size_t key_length, void *context);
87
88 HASHKIT_API
89 void libhashkit_md5_signature(const unsigned char *key, size_t length, unsigned char *result);
90
91 #ifdef __cplusplus
92 }
93 #endif