MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / hash_bytes

Function hash_bytes

crates/sats/src/hash.rs:53–55  ·  view source on GitHub ↗
(bytes: impl AsRef<[u8]>)

Source from the content-addressed store, hash-verified

51}
52
53pub fn hash_bytes(bytes: impl AsRef<[u8]>) -> Hash {
54 Hash::from_byte_array(Keccak256::digest(bytes).into())
55}
56
57impl fmt::Display for Hash {
58 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {

Callers 4

from_bytesMethod · 0.85
getMethod · 0.85
putMethod · 0.85
hashMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…