223 ASSERT(start_bucket >= 0 && start_bucket <= end_bucket);
383#define mix(a, b, c) \
415hash_func(
const uint8_t *k, uint32_t length, uint32_t initval)
417 uint32_t a, b, c, len;
427 a += (k[0] + ((uint32_t)k[1] << 8) + ((uint32_t)k[2] << 16) + ((uint32_t)k[3] << 24));
428 b += (k[4] + ((uint32_t)k[5] << 8) + ((uint32_t)k[6] << 16) + ((uint32_t)k[7] << 24));
429 c += (k[8] + ((uint32_t)k[9] << 8) + ((uint32_t)k[10] << 16) + ((uint32_t)k[11] << 24));
440 c += ((uint32_t)k[10] << 24);
444 c += ((uint32_t)k[9] << 16);
448 c += ((uint32_t)k[8] << 8);
453 b += ((uint32_t)k[7] << 24);
457 b += ((uint32_t)k[6] << 16);
461 b += ((uint32_t)k[5] << 8);
469 a += ((uint32_t)k[3] << 24);
473 a += ((uint32_t)k[2] << 16);
477 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)
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 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)
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)
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
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.