This add AES support.
[m6w6/libmemcached] / libhashkit-1.0 / hashkit.h
index 97af9866dbfcffc93ea356f482fab5c899cc9c15..560763a70fb983b6c97336e5198b054a4648e4f7 100644 (file)
@@ -55,6 +55,7 @@
 #include <libhashkit-1.0/function.h>
 #include <libhashkit-1.0/str_algorithm.h>
 #include <libhashkit-1.0/strerror.h>
+#include <libhashkit-1.0/string.h>
 
 struct hashkit_st
 {
@@ -70,6 +71,8 @@ struct hashkit_st
   struct {
     bool is_allocated:1;
   } options;
+
+  void *_key;
 };
 
 #ifdef __cplusplus
@@ -77,16 +80,27 @@ extern "C" {
 #endif
 
 HASHKIT_API
-hashkit_st *hashkit_create(hashkit_st *hash);
+  hashkit_st *hashkit_create(hashkit_st *hash);
+
+HASHKIT_API
+  hashkit_st *hashkit_clone(hashkit_st *destination, const hashkit_st *ptr);
+
+HASHKIT_API
+  bool hashkit_compare(const hashkit_st *first, const hashkit_st *second);
+
+HASHKIT_API
+  void hashkit_free(hashkit_st *hash);
 
 HASHKIT_API
-hashkit_st *hashkit_clone(hashkit_st *destination, const hashkit_st *ptr);
+  hashkit_string_st *hashkit_encrypt(hashkit_st *,
+                                     const char* source, size_t source_length);
 
 HASHKIT_API
-bool hashkit_compare(const hashkit_st *first, const hashkit_st *second);
+  hashkit_string_st *hashkit_decrypt(hashkit_st *,
+                                     const char* source, size_t source_length);
 
 HASHKIT_API
-void hashkit_free(hashkit_st *hash);
+  bool hashkit_key(hashkit_st *, const char *key, const size_t key_length);
 
 #ifdef __cplusplus
 } // extern "C"