Skip to main content

hash_leaf

Function hash_leaf 

Source
pub fn hash_leaf(data: &[u8]) -> MerkleHash
Expand description

Hash a leaf value with RFC 6962 domain separation: SHA-256(0x00 || data).

Args:

  • data — Raw leaf bytes (typically canonical JSON of an entry).

Usage:

let leaf = hash_leaf(b"entry data");