wip: redis, sqlalchemy, structured, etc
This commit is contained in:
11
auth/password.py
Normal file
11
auth/password.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from passlib.hash import pbkdf2_sha256
|
||||
|
||||
|
||||
class Password:
|
||||
@staticmethod
|
||||
def encode(password: str) -> str:
|
||||
return pbkdf2_sha256.hash(password)
|
||||
|
||||
@staticmethod
|
||||
def verify(password: str, other: str) -> bool:
|
||||
return pbkdf2_sha256.verify(password, other)
|
Reference in New Issue
Block a user