Changes from sha512 to scrypt to fit with DS-GVO

This commit is contained in:
2026-06-22 00:21:15 +02:00
parent 2bb0cbe599
commit 7df9b65389
+3 -2
View File
@@ -432,7 +432,7 @@ def check_password_strength(password):
def hashing(password): def hashing(password):
""" """
Hash a password using SHA-512. Hash a password using scrypt.
Args: Args:
password (str): Password to hash password (str): Password to hash
@@ -440,7 +440,8 @@ def hashing(password):
Returns: Returns:
str: Hexadecimal digest of the hashed password str: Hexadecimal digest of the hashed password
""" """
return hashlib.sha512(password.encode()).hexdigest() hashed = hashlib.scrypt(password.encode(), salt=b'some_salt', n=16384, r=8, p=1)
return hashed.hex()
def check_nm_pwd(username, password): def check_nm_pwd(username, password):