Skip to main content

stable_digest

Function stable_digest 

Source
pub fn stable_digest(parts: &[&[u8]]) -> String
Expand description

A hex BLAKE3 digest of parts that is the same in every process and every release.

Each part is length-prefixed, so no two different lists of parts can ever hash to the same value: pass the parts as they are and do not add separators of your own. Returns all 64 hex characters; truncate at the call site if a shorter identifier is wanted.

Unkeyed, so the digest of a guessable input is guessable. Anything that has to resist that must include a secret part of its own, the way crate::page_visit_hasher mixes in the day’s key.

New callers use this; crate::error_identifier’s own scheme stays only because its stored identifiers may not change.