Function sha_crypt::sha256_check
source · pub fn sha256_check(password: &str, hashed_value: &str) -> Result<(), CheckError>
Available on crate feature
simple
only.Expand description
Checks that given password matches provided hash.
Arguments
password
- expected passwordhashed_value
- the hashed value which should be used for checking, should be of format mentioned in 1:$6$<SALT>$<PWD>
Return
OK(())
if password matches otherwise Err(CheckError) in case of invalid
format or password mismatch.