2 +--------------------------------------------------------------------+
3 | libmemcached - C/C++ Client Library for memcached |
4 +--------------------------------------------------------------------+
5 | Redistribution and use in source and binary forms, with or without |
6 | modification, are permitted under the terms of the BSD license. |
7 | You should have received a copy of the license in a bundled file |
8 | named LICENSE; in case you did not receive a copy you can review |
9 | the terms online at: https://opensource.org/licenses/BSD-3-Clause |
10 +--------------------------------------------------------------------+
11 | Copyright (c) 2006-2014 Brian Aker https://datadifferential.com/ |
12 | Copyright (c) 2020 Michael Wallner <mike@php.net> |
13 +--------------------------------------------------------------------+
18 #if !defined(__cplusplus)
20 # include <inttypes.h>
24 #include <sys/types.h>
26 #include <libhashkit-1/visibility.h>
27 #include <libhashkit-1/configure.h>
28 #include <libhashkit-1/types.h>
29 #include <libhashkit-1/has.h>
30 #include <libhashkit-1/algorithm.h>
31 #include <libhashkit-1/behavior.h>
32 #include <libhashkit-1/digest.h>
33 #include <libhashkit-1/function.h>
34 #include <libhashkit-1/str_algorithm.h>
35 #include <libhashkit-1/strerror.h>
36 #include <libhashkit-1/string.h>
39 struct hashkit_function_st
{
40 hashkit_hash_fn function
;
42 } base_hash
, distribution_hash
;
45 bool is_base_same_distributed
: 1;
49 bool is_allocated
: 1;
60 hashkit_st
*hashkit_create(hashkit_st
*hash
);
63 hashkit_st
*hashkit_clone(hashkit_st
*destination
, const hashkit_st
*ptr
);
66 bool hashkit_compare(const hashkit_st
*first
, const hashkit_st
*second
);
69 void hashkit_free(hashkit_st
*hash
);
72 hashkit_string_st
*hashkit_encrypt(hashkit_st
*, const char *source
, size_t source_length
);
75 hashkit_string_st
*hashkit_decrypt(hashkit_st
*, const char *source
, size_t source_length
);
78 bool hashkit_key(hashkit_st
*, const char *key
, const size_t key_length
);