1
0
mirror of https://github.com/avatao-content/test-tutorial-framework synced 2024-12-05 02:41:32 +00:00

Make indexing more consistent

This commit is contained in:
R. Richard 2019-06-11 13:22:22 +02:00
parent a1f148f8e0
commit 4a08687ac8

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