ADD Verify_password
This commit is contained in:
@@ -3,3 +3,7 @@ from hashlib import md5
|
|||||||
|
|
||||||
def hash_password(password: str) -> str:
|
def hash_password(password: str) -> str:
|
||||||
return md5(password.encode()).hexdigest()
|
return md5(password.encode()).hexdigest()
|
||||||
|
|
||||||
|
|
||||||
|
def verify_password(password: str, hashed_password: str) -> bool:
|
||||||
|
return hash_password(password) == hashed_password
|
||||||
|
|||||||
Reference in New Issue
Block a user