MCPcopy Create free account
hub / github.com/PerroEngine/Perro / hash64_bytes

Function hash64_bytes

perro_source/api_modules/perro_modules/src/random.rs:181–188  ·  view source on GitHub ↗
(bytes: &[u8])

Source from the content-addressed store, hash-verified

179
180#[inline]
181pub fn hash64_bytes(bytes: &[u8]) -> u64 {
182 let mut hash = FNV1A_OFFSET64;
183 for &byte in bytes {
184 hash ^= byte as u64;
185 hash = hash.wrapping_mul(FNV1A_PRIME64);
186 }
187 hash64_u64(hash ^ bytes.len() as u64)
188}
189
190#[inline]
191pub fn hash64_str(value: &str) -> u64 {

Callers 1

hash64_strFunction · 0.85

Calls 2

hash64_u64Function · 0.85
lenMethod · 0.45

Tested by

no test coverage detected