Rename variable to be more precise

This commit is contained in:
R. Richard 2019-06-07 15:10:29 +02:00
parent 9d9021d01d
commit a1f148f8e0
1 changed files with 3 additions and 3 deletions

View File

@ -9,9 +9,9 @@ class PasswordHasher:
return PasswordHasher.scrypt(password, salt).hex()+salt.hex()
@staticmethod
def verify(password, hashdigest):
salt = bytes.fromhex(hashdigest[64:])
hashdigest = bytes.fromhex(hashdigest[:64])
def verify(password, salted_hash):
salt = bytes.fromhex(salted_hash[64:])
hashdigest = bytes.fromhex(salted_hash[:64])
return PasswordHasher.scrypt(password, salt) == hashdigest
@staticmethod