Use same number of iterations as original salted password

This commit is contained in:
XANTRONIX Development 2024-11-29 23:44:37 -05:00
parent f9ee7bfdc0
commit 031b4d9617

View file

@ -31,6 +31,6 @@ def compare(password: str, crypted: str) -> bool:
if algorithm != ALGORITHM:
return False
new_crypted = crypt(password, base64.b64decode(salt))
new_crypted = crypt(password, base64.b64decode(salt), int(iterations))
return secrets.compare_digest(crypted, new_crypted)