MCPcopy Create free account
hub / github.com/BitVM/BitVM / hash_pair

Function hash_pair

header-chain/src/utils.rs:18–23  ·  view source on GitHub ↗

Utility function to hash two nodes together

(left: [u8; 32], right: [u8; 32])

Source from the content-addressed store, hash-verified

16
17/// Utility function to hash two nodes together
18pub fn hash_pair(left: [u8; 32], right: [u8; 32]) -> [u8; 32] {
19 let mut hasher = Sha256::default();
20 hasher.update(left);
21 hasher.update(right);
22 hasher.finalize().into()
23}

Callers 4

recalculate_peaksMethod · 0.70
get_subrootMethod · 0.70
appendMethod · 0.70
verify_proofMethod · 0.70

Calls 2

intoMethod · 0.45
finalizeMethod · 0.45

Tested by

no test coverage detected