use light owasp defs instead of argon2 defs
the ones now used by default in rust-argon2 are extremely aggressive and resource intensive. owasp's 2nd default is very reasonable with the same security. Signed-off-by: girlbossceo <june@girlboss.ceo>
This commit is contained in:
parent
23ec725923
commit
b8acacfb3e
1 changed files with 1 additions and 1 deletions
|
@ -75,7 +75,7 @@ pub fn random_string(length: usize) -> String {
|
|||
pub fn calculate_password_hash(password: &str) -> Result<String, argon2::Error> {
|
||||
let hashing_config = Config {
|
||||
variant: Variant::Argon2id,
|
||||
..Default::default()
|
||||
..Config::owasp2() // m=19456 (19 MiB), t=2, p=1 from https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html#argon2id
|
||||
};
|
||||
|
||||
let salt = random_string(32);
|
||||
|
|
Loading…
Add table
Reference in a new issue