mirror of
https://github.com/avatao-content/test-tutorial-framework
synced 2024-11-14 21:57:17 +00:00
Make indexing more consistent
This commit is contained in:
parent
a1f148f8e0
commit
4a08687ac8
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user