From 15613b6620d21fff2e24d966c007aadb14630fdb Mon Sep 17 00:00:00 2001 From: Bernd Schoolmann Date: Mon, 27 Mar 2023 08:45:16 +0200 Subject: Fix argon2 login --- src/identity.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/identity.rs b/src/identity.rs index 123dc31..7836a11 100644 --- a/src/identity.rs +++ b/src/identity.rs @@ -41,7 +41,6 @@ impl Identity { hasher.update(email.as_bytes()); let salt = hasher.finalize(); - let mut output_key_material = [0u8]; let argon2_config = argon2::Argon2::new( argon2::Algorithm::Argon2id, argon2::Version::V0x13, @@ -57,10 +56,9 @@ impl Identity { &argon2_config, password.password(), &salt, - &mut output_key_material, + enc_key, ) .map_err(|_| Error::Argon2)?; - enc_key.copy_from_slice(&output_key_material); } }; -- cgit v1.2.3