Fixed autoconf macros for cross compile
[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 #ifndef HASHKIT_ALGORITHM_H
15 #define HASHKIT_ALGORITHM_H
16
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20
21 HASHKIT_API
22 uint32_t libhashkit_one_at_a_time(const char *key, size_t key_length);
23
24 HASHKIT_API
25 uint32_t libhashkit_fnv1_64(const char *key, size_t key_length);
26
27 HASHKIT_API
28 uint32_t libhashkit_fnv1a_64(const char *key, size_t key_length);
29
30 HASHKIT_API
31 uint32_t libhashkit_fnv1_32(const char *key, size_t key_length);
32
33 HASHKIT_API
34 uint32_t libhashkit_fnv1a_32(const char *key, size_t key_length);
35
36 HASHKIT_API
37 uint32_t libhashkit_crc32(const char *key, size_t key_length);
38
39 #ifdef HAVE_HSIEH_HASH
40 HASHKIT_API
41 uint32_t libhashkit_hsieh(const char *key, size_t key_length);
42 #endif
43
44 HASHKIT_API
45 uint32_t libhashkit_murmur(const char *key, size_t key_length);
46
47 HASHKIT_API
48 uint32_t libhashkit_jenkins(const char *key, size_t key_length);
49
50 HASHKIT_API
51 uint32_t libhashkit_md5(const char *key, size_t key_length);
52
53 HASHKIT_LOCAL
54 uint32_t hashkit_one_at_a_time(const char *key, size_t key_length, void *context);
55
56 HASHKIT_LOCAL
57 uint32_t hashkit_fnv1_64(const char *key, size_t key_length, void *context);
58
59 HASHKIT_LOCAL
60 uint32_t hashkit_fnv1a_64(const char *key, size_t key_length, void *context);
61
62 HASHKIT_LOCAL
63 uint32_t hashkit_fnv1_32(const char *key, size_t key_length, void *context);
64
65 HASHKIT_LOCAL
66 uint32_t hashkit_fnv1a_32(const char *key, size_t key_length, void *context);
67
68 HASHKIT_LOCAL
69 uint32_t hashkit_crc32(const char *key, size_t key_length, void *context);
70
71 #ifdef HAVE_HSIEH_HASH
72 HASHKIT_LOCAL
73 uint32_t hashkit_hsieh(const char *key, size_t key_length, void *context);
74 #endif
75
76 HASHKIT_LOCAL
77 uint32_t hashkit_murmur(const char *key, size_t key_length, void *context);
78
79 HASHKIT_LOCAL
80 uint32_t hashkit_jenkins(const char *key, size_t key_length, void *context);
81
82 HASHKIT_LOCAL
83 uint32_t hashkit_md5(const char *key, size_t key_length, void *context);
84
85 HASHKIT_API
86 void libhashkit_md5_signature(const unsigned char *key, size_t length, unsigned char *result);
87
88 #ifdef __cplusplus
89 }
90 #endif
91
92 #endif /* HASHKIT_ALGORITHM_H */