+
+ hashkit_st() :
+ base_hash(),
+ distribution_hash(),
+ flags(),
+ options()
+ {
+ hashkit_create(this);
+ }
+
+ hashkit_st(const hashkit_st& source) :
+ base_hash(),
+ distribution_hash(),
+ flags(),
+ options()
+ {
+ hashkit_clone(this, &source);
+ }
+
+ hashkit_st& operator=(const hashkit_st& source)
+ {
+ hashkit_free(this);
+ hashkit_clone(this, &source);
+
+ return *this;
+ }
+
+ friend bool operator==(const hashkit_st &left, const hashkit_st &right)
+ {
+ return hashkit_compare(&left, &right);
+ }
+
+ uint32_t digest(std::string& str)
+ {
+ return hashkit_digest(this, str.c_str(), str.length());
+ }
+
+ uint32_t digest(const char *key, size_t key_length)
+ {
+ return hashkit_digest(this, key, key_length);
+ }
+
+ hashkit_return_t set_function(hashkit_hash_algorithm_t hash_algorithm)
+ {
+ return hashkit_set_function(this, hash_algorithm);
+ }
+
+ hashkit_return_t set_distribution_function(hashkit_hash_algorithm_t hash_algorithm)
+ {
+ return hashkit_set_function(this, hash_algorithm);
+ }
+
+ ~hashkit_st()
+ {
+ hashkit_free(this);
+ }