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

Function calculate_sha256

header-chain/src/utils.rs:11–15  ·  view source on GitHub ↗
(input: &[u8])

Source from the content-addressed store, hash-verified

9}
10
11pub fn calculate_sha256(input: &[u8]) -> [u8; 32] {
12 let mut hasher = Sha256::default();
13 hasher.update(input);
14 hasher.finalize().into()
15}
16
17/// Utility function to hash two nodes together
18pub fn hash_pair(left: [u8; 32], right: [u8; 32]) -> [u8; 32] {

Callers

nothing calls this directly

Calls 2

intoMethod · 0.45
finalizeMethod · 0.45

Tested by

no test coverage detected