Update hash crates

This commit is contained in:
Steven Fackler 2021-12-08 18:30:44 -05:00
parent c5591c810c
commit 8ead6e6c69
No known key found for this signature in database
GPG Key ID: 30A04EB23B15B465
3 changed files with 6 additions and 6 deletions

View File

@ -13,9 +13,9 @@ base64 = "0.13"
byteorder = "1.0"
bytes = "1.0"
fallible-iterator = "0.2"
hmac = "0.11"
md-5 = "0.9"
hmac = "0.12"
md-5 = "0.10"
memchr = "2.0"
rand = "0.8"
sha2 = "0.9"
sha2 = "0.10"
stringprep = "0.1"

View File

@ -1,6 +1,6 @@
//! SASL-based authentication support.
use hmac::{Hmac, Mac, NewMac};
use hmac::{Hmac, Mac};
use rand::{self, Rng};
use sha2::digest::FixedOutput;
use sha2::{Digest, Sha256};
@ -275,7 +275,7 @@ impl ScramSha256 {
let mut hmac = Hmac::<Sha256>::new_from_slice(&server_key)
.expect("HMAC is able to accept all key sizes");
hmac.update(auth_message.as_bytes());
hmac.verify(&verifier)
hmac.verify_slice(&verifier)
.map_err(|_| io::Error::new(io::ErrorKind::InvalidInput, "SCRAM verification error"))
}
}

View File

@ -7,7 +7,7 @@
//! end up in logs pg_stat displays, etc.
use crate::authentication::sasl;
use hmac::{Hmac, Mac, NewMac};
use hmac::{Hmac, Mac};
use md5::Md5;
use rand::RngCore;
use sha2::digest::FixedOutput;