19 lines
363 B
C
19 lines
363 B
C
#ifndef HASH_H
|
|
#define HASH_H
|
|
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
|
|
typedef struct {
|
|
uint64_t state;
|
|
} Hasher;
|
|
|
|
uint64_t hasher_finish(Hasher hasher);
|
|
void hasher_hash_u64(Hasher* hasher, uint64_t v);
|
|
void hasher_hash_u8(Hasher* hasher, uint8_t v);
|
|
|
|
void string_hash(Hasher* hasher, const char* str);
|
|
void size_hash(Hasher* hasher, size_t value);
|
|
|
|
#endif
|