bug fix
This commit is contained in:
parent
e26ea1068d
commit
46fded3791
@ -363,12 +363,8 @@ impl User {
|
||||
engine.write_all(&entropy);
|
||||
let hash = sha256::Hash::from_engine(engine);
|
||||
|
||||
let aes_dec = Aes256Decryption::new(
|
||||
Purpose::ThirtyTwoBytes,
|
||||
ciphertext,
|
||||
hash.to_byte_array().to_vec(),
|
||||
None,
|
||||
)?;
|
||||
let aes_dec =
|
||||
Aes256Decryption::new(Purpose::ThirtyTwoBytes, ciphertext, hash.to_byte_array())?;
|
||||
|
||||
aes_dec.decrypt_with_key()
|
||||
}
|
||||
@ -379,12 +375,7 @@ impl User {
|
||||
engine.write_all(&entropy);
|
||||
let hash = sha256::Hash::from_engine(engine);
|
||||
|
||||
let aes_dec = Aes256Decryption::new(
|
||||
Purpose::Login,
|
||||
ciphertext,
|
||||
hash.to_byte_array().to_vec(),
|
||||
None,
|
||||
)?;
|
||||
let aes_dec = Aes256Decryption::new(Purpose::Login, ciphertext, hash.to_byte_array())?;
|
||||
|
||||
aes_dec.decrypt_with_key()
|
||||
}
|
||||
@ -403,12 +394,7 @@ impl User {
|
||||
.ok_or_else(|| anyhow::Error::msg("Failed to retrieve the sharded secret"))?,
|
||||
)?;
|
||||
|
||||
let aes_dec = Aes256Decryption::new(
|
||||
Purpose::Login,
|
||||
part2_key_enc,
|
||||
hash.to_byte_array().to_vec(),
|
||||
None,
|
||||
)?;
|
||||
let aes_dec = Aes256Decryption::new(Purpose::Login, part2_key_enc, hash.to_byte_array())?;
|
||||
|
||||
aes_dec.decrypt_with_key()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user