Skip to main content

hash

Function hash 

Source
pub fn hash(secret: &str, domain: Option<&str>) -> String
Expand description

What a secret is kept as: its SHA-256 as 64 lowercase hexadecimal characters.

With a domain, the digest is over domain, a zero byte, then the secret, so a digest kept for one purpose cannot be presented for another.