switch to RustCrypto's argon2 crate

This commit is contained in:
Charles Hall 2024-06-02 17:52:43 -07:00
parent 60d32ddf48
commit aa4cd8b1e1
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
6 changed files with 58 additions and 58 deletions

View file

@ -113,11 +113,7 @@ pub(crate) async fn login_route(
));
}
let hash_matches =
argon2::verify_encoded(&hash, password.as_bytes())
.unwrap_or(false);
if !hash_matches {
if !utils::verify_password_hash(hash, password) {
return Err(Error::BadRequest(
ErrorKind::forbidden(),
"Wrong username or password.",