Bugfix/argon2 mem usage (#2474)

* reduce argon2 memory usage

* update FE argon2

* fix missing typedefs
This commit is contained in:
Aiden McClelland
2023-10-25 00:17:29 -06:00
committed by GitHub
parent a96467cb3e
commit 531e037974
3 changed files with 7 additions and 5 deletions

View File

@@ -84,7 +84,7 @@ impl<G: GenericMountGuard> BackupMountGuard<G> {
argon2::hash_encoded(
password.as_bytes(),
&rand::random::<[u8; 16]>()[..],
&argon2::Config::default(),
&argon2::Config::rfc9106_low_mem(),
)
.with_kind(crate::ErrorKind::PasswordHashGeneration)?,
);
@@ -134,7 +134,7 @@ impl<G: GenericMountGuard> BackupMountGuard<G> {
argon2::hash_encoded(
new_password.as_bytes(),
&rand::random::<[u8; 16]>()[..],
&argon2::Config::default(),
&argon2::Config::rfc9106_low_mem(),
)
.with_kind(crate::ErrorKind::PasswordHashGeneration)?,
);