nalgeon / sqlean

The ultimate set of SQLite extensions
MIT License
3.65k stars 115 forks source link

Add blake3 support #115

Closed notpeter closed 4 months ago

notpeter commented 4 months ago

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.

nalgeon commented 4 months ago

Thank you! BLAKE3 looks very nice.