Crate fuchsia_merkle

Crate fuchsia_merkle 

Source
Expand description

fuchsia_merkle contains types and methods for building and working with 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.
MerkleTree
A MerkleTree contains levels of hashes that can be used to verify the integrity of data.
MerkleTreeBuilder
A MerkleTreeBuilder generates a MerkleTree from one or more write calls.
MerkleTreeWriter
A MerkleTreeWriter wraps a MerkleTreeBuilder and another type that implements std::io::Write.
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§

from_async_read
Compute a merkle tree from a futures::io::AsyncRead.
from_read
Compute a merkle tree from a std::io::Read.
from_slice
Compute a merkle tree from a &[u8].
hash_block
Compute the merkle hash of a block of data.

Type Aliases§

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