hash.h
#ifndef ANI_HASH_H
#define ANI_HASH_H
#define HASH_NONE 0
#define HASH_BLAKE3 1
#define BLAKE3_BYTES 32
struct hash {
uint8_t variant; /* One of the HASH_* defines */
/* FIXME(laumann): this should be a union { uint8_t blake3[BLAKE3_BYTES] } */
uint8_t bytes[BLAKE3_BYTES];
};
struct hashlist {
size_t len;
struct hash *entries;
};
void hashprintln(struct hash *);
void hashprint(struct hash *);
/* Return 1 when hashes are equal, 0 otherwise */
int hasheq(struct hash *, struct hash *);
void hashlist_free(struct hashlist *h);
#endif