aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernd Schoolmann <mail@quexten.com>2023-03-27 08:45:16 +0200
committerBernd Schoolmann <mail@quexten.com>2023-03-27 08:45:16 +0200
commit15613b6620d21fff2e24d966c007aadb14630fdb (patch)
treee1a051db62754e4b8ba5a46cb6cb8c0d39271ecb
parentfbb1634750701e6c98eab6ae2afc6467edc13475 (diff)
downloadrbw-15613b6620d21fff2e24d966c007aadb14630fdb.tar.gz
rbw-15613b6620d21fff2e24d966c007aadb14630fdb.zip
Fix argon2 login
-rw-r--r--src/identity.rs4
1 files changed, 1 insertions, 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);
}
};