hmac_stored_hash

Function hmac_stored_hash 

Source
pub fn hmac_stored_hash(pepper: &[u8], secret: &str) -> String
Expand description

Peppered stored-hash format (#124): hmac-sha256:<hex(HMAC-SHA256(pepper, secret))>. Used for every NEW credential write (config seeding, store re-hash on legacy verify) when a pepper is configured; without one the legacy sha256_stored_hash format remains in force. An HMAC key shorter than the block size weakens the construction, so deployments should use at least 32 bytes of entropy (not enforced: a short pepper still strictly dominates no pepper).