Skip to main content

empty_root

Function empty_root 

Source
pub fn empty_root() -> Hash
Expand description

Hash of an empty tree, per RFC 6962: HASH().

ยงExample

use publet_algorithms::log::{empty_root, root, to_hex};

assert_eq!(root(&[]), empty_root());
// SHA-256 of nothing, as RFC 6962 defines it.
assert_eq!(
    to_hex(&empty_root()),
    "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
);