Update mw.py

This commit is contained in:
dami
2025-09-11 16:49:01 +08:00
parent a5ee38d4fd
commit a5a06fbaab
+2 -2
View File
@@ -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'), salt)
# salt = bcrypt.gensalt()
hpw = bcrypt.hashpw(password.encode('utf-8'), password.encode('utf-8'))
return hpw.decode('utf-8')