40#define hashsize(n) ((uint32_t)1<<(n))
41#define hashmask(n) (hashsize(n)-1)
113uint32_t
hash_func(
const uint8_t *k, uint32_t length, uint32_t initval);
115static inline uint32_t
#define ALLOC_OBJ(dptr, type)
static const char *const key1
static bool hash_remove(struct hash *hash, const void *key)
void hash_iterator_init(struct hash *hash, struct hash_iterator *iter)
void hash_iterator_free(struct hash_iterator *hi)
struct hash_element * hash_iterator_next(struct hash_iterator *hi)
static void * hash_lookup(struct hash *hash, const void *key)
static int hash_n_elements(const struct hash *hash)
void hash_iterator_delete_element(struct hash_iterator *hi)
struct hash_element * hash_lookup_fast(struct hash *hash, struct hash_bucket *bucket, const void *key, uint32_t hv)
struct hash * hash_init(const int n_buckets, const uint32_t iv, uint32_t(*hash_function)(const void *key, uint32_t iv), bool(*compare_function)(const void *key1, const void *key2))
void hash_iterator_init_range(struct hash *hash, struct hash_iterator *hi, int start_bucket, int end_bucket)
static uint32_t hash_value(const struct hash *hash, const void *key)
static int hash_n_buckets(const struct hash *hash)
bool hash_remove_fast(struct hash *hash, struct hash_bucket *bucket, const void *key, uint32_t hv)
uint32_t hash_func(const uint8_t *k, uint32_t length, uint32_t initval)
void hash_free(struct hash *hash)
bool hash_add(struct hash *hash, const void *key, void *value, bool replace)
void hash_remove_by_value(struct hash *hash, void *value)
static void hash_add_fast(struct hash *hash, struct hash_bucket *bucket, const void *key, uint32_t hv, void *value)
struct hash_element * list
struct hash_element * next
struct hash_bucket * bucket
struct hash_element * elem
struct hash_element * last
uint32_t(* hash_function)(const void *key, uint32_t iv)
struct hash_bucket * buckets
bool(* compare_function)(const void *key1, const void *key2)
Container for bidirectional cipher and HMAC key material.
Container for unidirectional cipher and HMAC key material.