This commit is contained in:
huoji
2022-08-22 20:14:03 +08:00
parent 7a2dad9291
commit 3475c90afe
50 changed files with 5523 additions and 19 deletions

18
Server/tools.py Normal file
View File

@@ -0,0 +1,18 @@
import hashlib
import base64
def base64_deocde(str):
try:
return base64.b64decode(str).decode('utf-8')
except:
return ""
def get_md5(password):
# 1- 实例化加密对象
md5 = hashlib.md5()
# 2- 进⾏加密操作
md5.update(password.encode('utf-8'))
# 3- 返回加密后的结果
return md5.hexdigest()