Update dependencies

This commit is contained in:
daxpedda
2021-06-22 14:35:14 -07:00
committed by Kevin Lewi
parent ca50d92f96
commit ed086c9528
4 changed files with 20 additions and 20 deletions
+4 -4
View File
@@ -222,8 +222,8 @@ impl<CS: CipherSuite> Envelope<CS> {
h.expand(&[nonce, STR_EXPORT_KEY].concat(), &mut export_key)
.map_err(|_| InternalPakeError::HkdfError)?;
let mut hmac =
Hmac::<CS::Hash>::new_varkey(&hmac_key).map_err(|_| InternalPakeError::HmacError)?;
let mut hmac = Hmac::<CS::Hash>::new_from_slice(&hmac_key)
.map_err(|_| InternalPakeError::HmacError)?;
hmac.update(nonce);
hmac.update(aad);
@@ -285,8 +285,8 @@ impl<CS: CipherSuite> Envelope<CS> {
h.expand(&[&self.nonce, STR_EXPORT_KEY].concat(), &mut export_key)
.map_err(|_| InternalPakeError::HkdfError)?;
let mut hmac =
Hmac::<CS::Hash>::new_varkey(&hmac_key).map_err(|_| InternalPakeError::HmacError)?;
let mut hmac = Hmac::<CS::Hash>::new_from_slice(&hmac_key)
.map_err(|_| InternalPakeError::HmacError)?;
hmac.update(&self.nonce);
hmac.update(aad);
if hmac.verify(&self.hmac).is_err() {