BLAKE3-team / BLAKE3

the official Rust and C implementations of the BLAKE3 cryptographic hash function
Apache License 2.0
4.71k stars 315 forks source link

Implement BufOutputReader; add rand_core impls for BufOutputReader #362

Open Taywee opened 7 months ago

Taywee commented 7 months ago

I initially started writing a separate crate for this, but the implementation is so minimal, I think it makes sense to roll it into the core library here.

Taywee commented 7 months ago

This has been largely rewritten. When adding buffering, I realized that it made no sense to have the buffering logic in the Rng-specific type. I've written a BufOutputReader type that handles the buffering and implemented the Rng traits for that.

Taywee commented 7 months ago

I'll also note that I have pushed this functionality as the external rand_blake3 crate, with the buffering extracted into the load-buffer crate. If you think this is too much feature creep for the blake3 crate itself, it won't hurt my feelings to just keep that functionality in those separate crates.