From 75e6b3f2f9f60240d7159b8852b31c665807958e Mon Sep 17 00:00:00 2001 From: AIIrondev Date: Mon, 22 Jun 2026 00:22:47 +0200 Subject: [PATCH] changed from sha512 to scrypt for improved security --- Website/user.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Website/user.py b/Website/user.py index f8eb9e4..777380d 100644 --- a/Website/user.py +++ b/Website/user.py @@ -39,7 +39,7 @@ def hashing(password): Returns: str: Hexadecimal digest of the hashed password """ - return hashlib.sha512(password.encode()).hexdigest() + return hashlib.scrypt(password.encode(), salt=b'salt_1234567890').hexdigest() def check_nm_pwd(username, password): @@ -56,7 +56,7 @@ def check_nm_pwd(username, password): client = None try: client, users = _get_users_collection() - hashed_password = hashlib.sha512(password.encode()).hexdigest() + hashed_password = hashing(password) return users.find_one({'Username': username, 'Password': hashed_password}) finally: if client: