Crate merkle

Source
Expand description

merkle implements a Merkle Tree in Rust.

Structs§

LeavesIntoIterator
An iterator over the leaves of a Tree.
LeavesIterator
An borrowing iterator over the leaves of a Tree.
Adapted from http://codereview.stackexchange.com/q/110283.
MerkleTree
A Merkle tree is a binary tree, with values of type T at the leafs, and where every internal node holds the hash of the concatenation of the hashes of its children nodes.
Proof
An inclusion proof represent the fact that a value is a member of a MerkleTree with root hash root_hash, and hash function algorithm.

Traits§

HashUtils
The sole purpose of this trait is to extend the standard ring::algo::Algorithm type with a couple utility functions.
Hashable
The type of values stored in a MerkleTree must implement this trait, in order for them to be able to be fed to a Ring Context when computing the hash of a leaf.