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

Function hash_str

code/chapter09/blockchain/blockchain2/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
18// 计算 value 哈希值并传递给 out 参数
19pub fn hash_u8(value: &[u8], mut out: &mut [u8]) {

Callers 2

runMethod · 0.50
newMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected