Skip to content

Commit 3843bbe

Browse files
committed
refactor: significantly increase argon2id strength
1 parent 972f289 commit 3843bbe

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

core/constants.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@
8383
}
8484

8585
# hash parameters
86-
ARGON2_MEMORY = 256 * 1024 # MB
87-
ARGON2_ITERS = 3
86+
ARGON2_MEMORY = 1024 * 1024 # MB
87+
ARGON2_ITERS = 2000
8888
ARGON2_OUTPUT_LEN = 32 # bytes
8989
ARGON2_SALT_LEN = 16 # bytes (Must be always 16 for interoperability with implementations using libsodium.)
9090
ARGON2_LANES = 4

logic/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def check_str_high_entropy(s: str) -> bool:
66
return False
77

88
# if string is not all ascii, just assume it has enough entropy.
9-
if not s.ascii():
9+
if not s.isascii():
1010
return True
1111

1212
# Check if string is all lowercase or uppercase

0 commit comments

Comments
 (0)