mirror of
https://github.com/avatao-content/test-tutorial-framework
synced 2024-11-15 01:27:18 +00:00
Make indexing more consistent
This commit is contained in:
parent
a1f148f8e0
commit
4a08687ac8
@ -10,8 +10,8 @@ class PasswordHasher:
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def verify(password, salted_hash):
|
def verify(password, salted_hash):
|
||||||
salt = bytes.fromhex(salted_hash[64:])
|
salt = bytes.fromhex(salted_hash)[32:]
|
||||||
hashdigest = bytes.fromhex(salted_hash[:64])
|
hashdigest = bytes.fromhex(salted_hash)[:32]
|
||||||
return PasswordHasher.scrypt(password, salt) == hashdigest
|
return PasswordHasher.scrypt(password, salt) == hashdigest
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
Loading…
Reference in New Issue
Block a user