MCPcopy Create free account
hub / github.com/QMHTMY/RustBook / hash_str

Function hash_str

code/chapter09/blockchain/blockchain8/utils/src/serializer.rs:12–16  ·  view source on GitHub ↗
(value: &[u8])

Source from the content-addressed store, hash-verified

10}
11
12pub fn hash_str(value: &[u8]) -> String {
13 let mut hasher = Sha3::sha3_256();
14 hasher.input(value);
15 hasher.result_str()
16}
17
18pub fn hash_u8(value: &[u8], mut out: &mut [u8]) {
19 let mut hasher = Sha3::sha3_256();

Callers 5

set_hashMethod · 0.50
runMethod · 0.50
genesis_blockMethod · 0.50
set_hashMethod · 0.50
merkle_hash_strMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected