referrerpolicy=no-referrer-when-downgrade

Function binary_merkle_tree::merkle_root

source ·
pub fn merkle_root<H, I>(leaves: I) -> H::Out
where H: Hasher, H::Out: Default + AsRef<[u8]>, I: IntoIterator, I::Item: AsRef<[u8]>,
Expand description

Construct a root hash of a Binary Merkle Tree created from given leaves.

See crate-level docs for details about Merkle Tree construction.

In case an empty list of leaves is passed the function returns a 0-filled hash.