BLAKE3-team / BLAKE3

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

Implement digest::DynDigest #260

Open raspi opened 2 years ago

raspi commented 2 years ago

According to https://crates.io/crates/digest/reverse_dependencies this crate uses digest crate.

Would it be possible to implement digest::DynDigest trait so that this hasher could be used in for example HashMaps which uses HashMap<&str, Box<dyn digest::DynDigest>> where you can iterate through multiple different hashers?

oconnor663 commented 2 years ago

Sounds like a good idea to me. If we put the impl next to the Digest impl in src/traits.rs, it will be gated by the traits-preview feature automatically.