mirror of
https://github.com/avatao-content/test-tutorial-framework
synced 2024-11-14 22:27:17 +00:00
Rename variable to be more precise
This commit is contained in:
parent
9d9021d01d
commit
a1f148f8e0
@ -9,9 +9,9 @@ class PasswordHasher:
|
|||||||
return PasswordHasher.scrypt(password, salt).hex()+salt.hex()
|
return PasswordHasher.scrypt(password, salt).hex()+salt.hex()
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def verify(password, hashdigest):
|
def verify(password, salted_hash):
|
||||||
salt = bytes.fromhex(hashdigest[64:])
|
salt = bytes.fromhex(salted_hash[64:])
|
||||||
hashdigest = bytes.fromhex(hashdigest[:64])
|
hashdigest = bytes.fromhex(salted_hash[:64])
|
||||||
return PasswordHasher.scrypt(password, salt) == hashdigest
|
return PasswordHasher.scrypt(password, salt) == hashdigest
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
Loading…
Reference in New Issue
Block a user