Password hashing
This commit is contained in:
1 parent
cb01e1bcf0
commit
42e2fbcdb5
3 files changed
+2
-12
No files matched your search
@@ -2,14 +2,6 @@ from argon2 import PasswordHasher
|
||||
from argon2.exceptions import InvalidHashError, VerifyMismatchError
|
||||
|
||||
|
||||
def hash_password(password: str) -> str:
|
||||
ph = PasswordHasher()
|
||||
|
||||
hashed = ph.hash(password)
|
||||
|
||||
return str(hashed)
|
||||
|
||||
|
||||
def verify_password(password: str, hashed_password: str) -> bool:
|
||||
ph = PasswordHasher()
|
||||
|
||||
|
||||
Reference in new issue
Block a user