I used the official Blake3 C reference implementation which I've intentionally left unchanged. I renamed from reference_impl.c to blake3_reference_impl.c. And same with the header file which necessitated altering the #include "blake3_reference_impl.h" line. Otherwise it's upstream.
I did not implement Blake3 keyed hashing mode (I've never used it) but it would be trivial to add blake3_keyed(data, key) function because the reference code supports it.
If performance is a concern, someone in the future could pull in the official C implementation of BLAKE3 which includes native accelerated versions (SSE2, AVX2, AVX512, Neon, etc) too but is likely harder to compile.
new
blake3()
function.I used the official Blake3 C reference implementation which I've intentionally left unchanged. I renamed from reference_impl.c to
blake3_reference_impl.c
. And same with the header file which necessitated altering the#include "blake3_reference_impl.h"
line. Otherwise it's upstream.I did not implement Blake3 keyed hashing mode (I've never used it) but it would be trivial to add
blake3_keyed(data, key)
function because the reference code supports it.If performance is a concern, someone in the future could pull in the official C implementation of BLAKE3 which includes native accelerated versions (SSE2, AVX2, AVX512, Neon, etc) too but is likely harder to compile.