MCPcopy Create free account
hub / github.com/TheRedDeveloper/ply-engine / hash_data_scalar

Function hash_data_scalar

src/engine.rs:756–764  ·  view source on GitHub ↗
(data: &[u8])

Source from the content-addressed store, hash-verified

754}
755
756fn hash_data_scalar(data: &[u8]) -> u64 {
757 let mut hash: u64 = 0;
758 for &b in data {
759 hash = hash.wrapping_add(b as u64);
760 hash = hash.wrapping_add(hash << 10);
761 hash ^= hash >> 6;
762 }
763 hash
764}
765
766pub fn hash_string(key: &str, seed: u32) -> Id {
767 let mut hash: u32 = seed;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected