#include <stdint.h> #include "vendor/blake3/blake3.h" #include "blake3.h" void blake3_hash(uint8_t *out, uint8_t *in, size_t len) { blake3_hasher b3sum; blake3_hasher_init(&b3sum); blake3_hasher_update(&b3sum, in, len); blake3_hasher_finalize(&b3sum, out, BLAKE3_OUT_LEN); } int blake3_cmp(uint8_t *h1, uint8_t *h2) { size_t i; for (i = 0; i < BLAKE3_OUT_LEN; i++) if (h1[i] != h2[i]) return 1; return 0; }