Crate fuchsia_merkle

Crate fuchsia_merkle 

Source
Expand description

fuchsia_merkle contains types and methods for building and working with merkle trees.

See https://fuchsia.dev/fuchsia-src/concepts/security/merkleroot for information on constructing merkle trees.

Structs§

BufferedMerkleRootBuilder
Calculates the merkle root for a given set of data. The leaf hashes of the merkle tree can optionally be collected for use with a MerkleVerifier.
MerkleRootBuilder
Calculates the merkle root for a given set of data. The leaf hashes of the merkle tree can optionally be collected for use with crate::MerkleVerifier.
MerkleVerifier
Verifies data against the leaf hashes of a merkle tree.
NoopLeafHashCollector
A LeafHashCollector that doesn’t collect leaf hashes.
ReadSizedMerkleVerifier
Verifies reads against a merkle tree.

Constants§

BLOCK_SIZE
The size of a single block of data (or hashes), in bytes.
HASH_SIZE
The size of a hash in bytes.

Traits§

LeafHashCollector
A trait for collecting the leaf hashes of a merkle tree while constructing a merkle root.

Functions§

root_from_reader
Computes the merkle root of the contents of a std::io::Read.
root_from_slice
Computes the merkle root of in-memory data.

Type Aliases§

Hash
A digest created by the Fuchsia Merkle Tree hashing algorithm. https://fuchsia.dev/fuchsia-src/concepts/packages/merkleroot