merkle-lite

License Cargo Documentation

A generic binary [Merkle tree], designed for [Rust Crypto] digest functions.

Examples

Here is an example to calculate the merkle root for the identical 16 leaves with [SHA3]:

```rust,norun use hexliteral::hex; use merklelite::MerkleTree; use sha3::Sha3256;

let tree: MerkleTree = [[0xabu8; 32]; 16].intoiter().collect();

assert_eq!( tree.root(), hex!("34fac4b8781d0b811746ec45623606f43df1a8b9009f89c5564e68025a6fd604"), ); ```

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.