221 ASSERT(start_bucket <= end_bucket);
384#define mix(a, b, c) \
416hash_func(
const uint8_t *k, uint32_t length, uint32_t initval)
418 uint32_t a, b, c, len;
428 a += (k[0] + ((uint32_t)k[1] << 8) + ((uint32_t)k[2] << 16) + ((uint32_t)k[3] << 24));
429 b += (k[4] + ((uint32_t)k[5] << 8) + ((uint32_t)k[6] << 16) + ((uint32_t)k[7] << 24));
430 c += (k[8] + ((uint32_t)k[9] << 8) + ((uint32_t)k[10] << 16) + ((uint32_t)k[11] << 24));
441 c += ((uint32_t)k[10] << 24);
445 c += ((uint32_t)k[9] << 16);
449 c += ((uint32_t)k[8] << 8);
454 b += ((uint32_t)k[7] << 24);
458 b += ((uint32_t)k[6] << 16);
462 b += ((uint32_t)k[5] << 8);
470 a += ((uint32_t)k[3] << 24);
474 a += ((uint32_t)k[2] << 16);
478 a += ((uint32_t)k[1] << 8);
#define ALLOC_OBJ_CLEAR(dptr, type)
#define ALLOC_ARRAY(dptr, type, n)
static const char *const key1
static size_t adjust_power_of_2(size_t u)
static void hash_remove_marked(struct hash *hash, struct hash_bucket *bucket)
void hash_iterator_free(struct hash_iterator *hi)
struct hash_element * hash_iterator_next(struct hash_iterator *hi)
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)
void hash_iterator_init(struct hash *hash, struct hash_iterator *hi)
static void hash_iterator_lock(struct hash_iterator *hi, struct hash_bucket *b)
bool hash_remove_fast(struct hash *hash, struct hash_bucket *bucket, const void *key, uint32_t hv)
static void hash_iterator_unlock(struct hash_iterator *hi)
struct hash * hash_init(const uint32_t 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))
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_iterator_advance(struct hash_iterator *hi)
void hash_iterator_init_range(struct hash *hash, struct hash_iterator *hi, uint32_t start_bucket, uint32_t end_bucket)
static uint32_t hash_value(const struct hash *hash, const void *key)
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
uint32_t bucket_index_end
struct hash_bucket * bucket
struct hash_element * elem
uint32_t bucket_index_start
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.