From 6a6afdbe72c626b01245c9372c9d10be79789bb0 Mon Sep 17 00:00:00 2001 From: Rasmus Luha Date: Sun, 6 Feb 2022 13:41:11 +0200 Subject: restrucurring the stucture of the folderstruture --> structure --- app/utils.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 app/utils.py (limited to 'app/utils.py') diff --git a/app/utils.py b/app/utils.py new file mode 100644 index 0000000..3cd58bf --- /dev/null +++ b/app/utils.py @@ -0,0 +1,9 @@ + +from passlib.context import CryptContext # passwordide hashimise jaoks + +pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto") +def hash(password: str): + return pwd_context.hash(password) + +def verify(plain_password, hashed_password): + return pwd_context.verify(plain_password, hashed_password) -- cgit v1.2.3