2 * Copyright (C) 2010 Brian Aker
5 * Use and distribution licensed under the BSD license. See
6 * the COPYING file in the parent directory for full text.
9 #ifndef HASHKIT_FUNCTION_H
10 #define HASHKIT_FUNCTION_H
17 uint32_t hashkit_generate_value(const hashkit_st
*self
, const char *key
, size_t key_length
);
20 This sets/gets the default function we will be using.
23 hashkit_return_t
hashkit_set_function(hashkit_st
*hash
, hashkit_hash_algorithm_t hash_algorithm
);
26 hashkit_return_t
hashkit_set_custom_function(hashkit_st
*hash
, hashkit_hash_fn function
, void *context
);
29 hashkit_hash_algorithm_t
hashkit_get_function(const hashkit_st
*hash
);
32 This sets/gets the function we use for distribution.
35 hashkit_return_t
hashkit_set_distribution_function(hashkit_st
*hash
, hashkit_hash_algorithm_t hash_algorithm
);
38 hashkit_return_t
hashkit_set_custom_distribution_function(hashkit_st
*self
, hashkit_hash_fn function
, void *context
);
41 hashkit_hash_algorithm_t
hashkit_get_distribution_function(const hashkit_st
*self
);
44 This is a utilitly function provided so that you can directly access hashes with a hashkit_st.
48 uint32_t libhashkit_generate_value(const char *key
, size_t key_length
, hashkit_hash_algorithm_t hash_algorithm
);
54 #endif /* HASHKIT_FUNCTION_H */