diff --git a/crates/sp_client/src/user.rs b/crates/sp_client/src/user.rs index 758c4f2..5038554 100644 --- a/crates/sp_client/src/user.rs +++ b/crates/sp_client/src/user.rs @@ -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() }