Changes from sha512 to scrypt to fit with DS-GVO
This commit is contained in:
@@ -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):
|
||||||
|
|||||||
Reference in New Issue
Block a user