mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-10 02:49:25 +08:00
Update mw.py
This commit is contained in:
+2
-2
@@ -431,8 +431,8 @@ def hasPwd(password):
|
||||
# import crypt
|
||||
# return crypt.crypt(password, password)
|
||||
import bcrypt
|
||||
# salt = bcrypt.gensalt()
|
||||
hpw = bcrypt.hashpw(password.encode('utf-8'), password.encode('utf-8'))
|
||||
salt = bcrypt.gensalt()
|
||||
hpw = bcrypt.hashpw(password.encode('utf-8'), salt)
|
||||
return hpw.decode('utf-8')
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user