Function password_auth::is_hash_obsolete
source · pub fn is_hash_obsolete(hash: &str) -> Result<bool, ParseError>
Expand description
Determine if the given password hash is using the recommended algorithm and parameters.
This can be used by implementations which wish to lazily update their
password hashes (i.e. by rehashing the password with generate_hash
)
to determine if such an update should be applied.
Returns
Ok(true)
if the hash isn’t using the latest recommended algorithm/parameters.Ok(false)
if the hash is using the latest recommended algorithm/parameters.Err(ParseError)
if the hash could not be parsed.