Fix for lp:962815, from https://launchpad.net/~harebox
[awesomized/libmemcached] / libhashkit-1.0 / 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 HASHKIT_API
39 uint32_t libhashkit_hsieh(const char *key, size_t key_length);
40
41 HASHKIT_API
42 uint32_t libhashkit_murmur(const char *key, size_t key_length);
43
44 HASHKIT_API
45 uint32_t libhashkit_jenkins(const char *key, size_t key_length);
46
47 HASHKIT_API
48 uint32_t libhashkit_md5(const char *key, size_t key_length);
49
50 HASHKIT_LOCAL
51 uint32_t hashkit_one_at_a_time(const char *key, size_t key_length, void *context);
52
53 HASHKIT_LOCAL
54 uint32_t hashkit_fnv1_64(const char *key, size_t key_length, void *context);
55
56 HASHKIT_LOCAL
57 uint32_t hashkit_fnv1a_64(const char *key, size_t key_length, void *context);
58
59 HASHKIT_LOCAL
60 uint32_t hashkit_fnv1_32(const char *key, size_t key_length, void *context);
61
62 HASHKIT_LOCAL
63 uint32_t hashkit_fnv1a_32(const char *key, size_t key_length, void *context);
64
65 HASHKIT_LOCAL
66 uint32_t hashkit_crc32(const char *key, size_t key_length, void *context);
67
68 HASHKIT_LOCAL
69 uint32_t hashkit_hsieh(const char *key, size_t key_length, void *context);
70
71 HASHKIT_LOCAL
72 uint32_t hashkit_murmur(const char *key, size_t key_length, void *context);
73
74 HASHKIT_LOCAL
75 uint32_t hashkit_jenkins(const char *key, size_t key_length, void *context);
76
77 HASHKIT_LOCAL
78 uint32_t hashkit_md5(const char *key, size_t key_length, void *context);
79
80 HASHKIT_API
81 void libhashkit_md5_signature(const unsigned char *key, size_t length, unsigned char *result);
82
83 #ifdef __cplusplus
84 }
85 #endif