mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-18 23:45:52 +08:00
Update mw.py
This commit is contained in:
+7
-2
@@ -424,9 +424,14 @@ def md5(content):
|
|||||||
|
|
||||||
def hasPwd(password):
|
def hasPwd(password):
|
||||||
# python3 -c "import crypt"
|
# python3 -c "import crypt"
|
||||||
|
# python3 -c 'import crypt; print(crypt.crypt(""))'
|
||||||
# 加密密码字符
|
# 加密密码字符
|
||||||
import crypt
|
# import crypt
|
||||||
return crypt.crypt(password, password)
|
# return crypt.crypt(password, password)
|
||||||
|
import bcrypt
|
||||||
|
salt = bcrypt.gensalt()
|
||||||
|
return bcrypt.hashpw(password.encode('utf-8'), salt)
|
||||||
|
|
||||||
|
|
||||||
def getFileMd5(filename):
|
def getFileMd5(filename):
|
||||||
# 文件的MD5值
|
# 文件的MD5值
|
||||||
|
|||||||
Reference in New Issue
Block a user