Make indexing more consistent

This commit is contained in:
R. Richard 2019-06-11 13:22:22 +02:00
parent a1f148f8e0
commit 4a08687ac8
1 changed files with 2 additions and 2 deletions

View File

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