Skip to main content

needs_rehash

Function needs_rehash 

Source
pub fn needs_rehash(stored: &str) -> bool
Expand description

Whether stored was written under parameters this build has since moved past – a different algorithm, or a lower iteration count.

A row that cannot be decoded reports true: it is already unusable, and re-encoding it on the next successful login is the only way it ever gets fixed. (verify_password will have returned Err for the same row, so this is reached only where a caller chose to carry on regardless.)