1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//! # merkle-hash
//!
//! Pluggable cryptographic hash adapters for **`MerkleForge`**.
//!
//! Each adapter wraps a well-tested upstream crate and implements the
//! [`HashFunction`] trait so it can drive any tree variant in `merkle-variants`.
//!
//! ## Available adapters
//!
//! | Type | Algorithm | Digest | Best for |
//! |------|-----------|--------|----------|
//! | [`Sha256`] | SHA-256 | 32 bytes | Hardware-accelerated production deployments |
//! | [`Keccak256`] | Keccak-256 | 32 bytes | Ethereum-compatible Patricia Tries |
//! | [`Blake3`] | BLAKE3 | 32 bytes | Maximum throughput on modern CPUs |
//!
//! ## Choosing a hash function
//!
//! - **SHA-256**: Excellent choice when targeting x86-64 hardware with SHA
//! extensions. Widely used in Bitcoin and many Ethereum-adjacent systems.
//! - **Keccak-256**: Required for any tree that must produce state roots
//! readable by Ethereum tooling (e.g. the `MerklePatriciaTrie` variant).
//! - **BLAKE3**: Fastest on software paths, good for throughput-sensitive
//! workloads where Ethereum compatibility is not required.
//!
//! Concrete benchmark numbers will be published in the Phase 5 report.
pub use crateBlake3;
pub use crateKeccak256;
pub use crateSha256;
/// Re-export of the [`HashFunction`] trait for convenience.
pub use HashFunction;