Skip to main content

deterministic_hash

Function deterministic_hash 

Source
pub fn deterministic_hash<T: DeterministicHash>(
    salt: &str,
    input: T,
    algorithm: HashAlgorithm,
) -> String
Expand description

Hash input with algorithm. If salt is non-empty it is written into the hasher before the content so the two are mixed in a single pass — never as a hash-of-hash composition. An empty salt produces the same result as hashing without a prefix.