Update ring to 0.13 and subtle to 2.0 (#1383)

This commit is contained in:
Pierre Krieger
2019-01-10 13:32:27 +01:00
committed by Bastian Köcher
parent bbbf315854
commit 42c30609d3
5 changed files with 132 additions and 148 deletions
+1 -1
View File
@@ -110,7 +110,7 @@ impl EncryptedKey {
let mac = blake2_256(&crypto::derive_mac(&derived_right_bits, &self.ciphertext));
if subtle::slices_equal(&mac[..], &self.mac[..]) != 1 {
if subtle::ConstantTimeEq::ct_eq(&mac[..], &self.mac[..]).unwrap_u8() != 1 {
return Err(ErrorKind::InvalidPassword.into());
}