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

Function hash_with_seed

rust/stringzilla.rs:1294–1302  ·  view source on GitHub ↗
(text: T, seed: u64)

Source from the content-addressed store, hash-verified

1292/// A `u64` representing the hash value of the input byte slice.
1293#[inline(always)]
1294pub fn hash_with_seed<T>(text: T, seed: u64) -> u64
1295where
1296 T: AsRef<[u8]>,
1297{
1298 let text_ref = text.as_ref();
1299 let text_pointer = text_ref.as_ptr() as _;
1300 let text_length = text_ref.len();
1301 unsafe { sz_hash(text_pointer, text_length, seed) }
1302}
1303
1304/// Computes a 64-bit AES-based hash value for a given byte slice `text`.
1305/// This function is designed to provide a high-quality hash value for use in

Callers 1

hashFunction · 0.85

Calls 3

as_ptrMethod · 0.80
lenMethod · 0.80
sz_hashFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…