Expand description
Hash utilities for cache keys and identifiers.
Uses BLAKE3. Prefer 32-byte hashes for exact keys and 64-bit hashes for compact ids.
Functionsยง
- hash_
cache_ content - Hashes cache content to a 32-byte digest (tenant + context + embedding + payload).
- hash_
context - Hashes a
(role, plan)pair into a compact 64-bit context hash. - hash_
prompt - Hashes a prompt to a 32-byte BLAKE3 digest.
- hash_
tenant_ id - Hashes a tenant identifier string to a compact 64-bit id.
- hash_
to_ u64 - Computes a 64-bit hash of the input data using BLAKE3, truncated from 256 bits.