From b44ebb066d5f747bf76ed47fc5f2881d33b9324f Mon Sep 17 00:00:00 2001 From: Vianpyro Date: Sun, 17 Nov 2024 12:39:20 -0500 Subject: [PATCH] Change hash_password_with_salt_and_pepper function to return a tuple of hashed password and salt --- routes/authentication.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/authentication.py b/routes/authentication.py index 1ac0a60..c82f865 100644 --- a/routes/authentication.py +++ b/routes/authentication.py @@ -14,7 +14,7 @@ ph = PasswordHasher() -def hash_password_with_salt_and_pepper(password: str) -> str: +def hash_password_with_salt_and_pepper(password: str) -> tuple[str, bytes]: salt = os.urandom(16) pepper = os.getenv("PEPPER").encode("utf-8") seasoned_password = password.encode("utf-8") + salt + pepper