Use same number of iterations as original salted password
This commit is contained in:
parent
f9ee7bfdc0
commit
031b4d9617
1 changed files with 1 additions and 1 deletions
|
@ -31,6 +31,6 @@ def compare(password: str, crypted: str) -> bool:
|
||||||
if algorithm != ALGORITHM:
|
if algorithm != ALGORITHM:
|
||||||
return False
|
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)
|
return secrets.compare_digest(crypted, new_crypted)
|
||||||
|
|
Loading…
Add table
Reference in a new issue