MCPcopy Create free account
hub / github.com/ashvardanian/StringZilla / hash

Method hash

rust/stringzilla.rs:591–595  ·  view source on GitHub ↗

Convenience method to hash data in one call.

(data: &[u8])

Source from the content-addressed store, hash-verified

589
590 /// Convenience method to hash data in one call.
591 pub fn hash(data: &[u8]) -> [u8; 32] {
592 let mut hasher = Sha256::new();
593 hasher.update(data);
594 hasher.digest()
595 }
596}
597
598impl Default for Sha256 {

Callers 4

test.jsFile · 0.45
sz_hashFunction · 0.45

Calls 2

updateMethod · 0.80
digestMethod · 0.45

Tested by 2