multiformats / rust-multihash

multihash implementation in Rust
https://github.com/multiformats/multihash
Other
153 stars 59 forks source link

Support arbitrary Blake3 sizes #130

Open vmx opened 3 years ago

vmx commented 3 years ago

In rust-multihash the digests are generic over their size. It should be possible to support arbitrarily sized Blake3 hashes. Currently the code will panic if you try a size differently from 256 bits.

vmx commented 3 years ago

Adding a different Blake3 size to the custom table example would be great.

mriise commented 2 years ago

156 solves part of this, as the hasher Blake3<S> is exposed, though going through the table doesn't work as the proc macro expects a type without a generic.