File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ class User(Model):
6767 def check_password (self , password : str ) -> bool :
6868 logging .debug ("Checking password again {} hashed password" .format (self .id ))
6969 _hash , salt = self .password .split (":" )
70- return _hash == hashlib .sha256 (salt .encode () + password .encode ()).hexdigest ()
70+ return _hash == hashlib .sha3_512 (salt .encode () + password .encode ()).hexdigest ()
7171
7272 @staticmethod
7373 def create (
Original file line number Diff line number Diff line change 2424def hash_password (password : str ) -> str :
2525 salt = uuid .uuid4 ().hex
2626 logging .debug ("Hashing password with salt {}" .format (salt ))
27- return hashlib .sha256 (salt .encode () + password .encode ()).hexdigest () + ":" + salt
27+ return hashlib .sha3_512 (salt .encode () + password .encode ()).hexdigest () + ":" + salt
You can’t perform that action at this time.
0 commit comments