antouhou / rs-merkle

The most advanced Merkle tree library for Rust
MIT License
168 stars 45 forks source link

Dynamic hash algorithm support #39

Open sinui0 opened 1 month ago

sinui0 commented 1 month ago

Hi, we're currently enjoying using this crate in our project. However, we're now looking to allow users to provide their own hash algorithms which are plugged in with dynamic dispatch. The Hasher trait is intended to be implemented on ZSTs, thus has no access to runtime information.

From the look of it changing Hasher to receive &self would be a relatively large change, although it may be possible to avoid breaking changes by adding new traits and further encapsulating some of the inner functionality. I'll just start with posing this issue, what do you think? I can contribute to this effort if desired.