提交 d40d7c2a2886338be359e9eac7de5eb8a78022e7

作者 nheweijun
1 个父辈 7f4712d1

2022.02.22 数据模块增加密码加密功能

@@ -31,7 +31,7 @@ class Api(ApiTemplate): @@ -31,7 +31,7 @@ class Api(ApiTemplate):
31 passwd = self.para.get("passwd") 31 passwd = self.para.get("passwd")
32 database = self.para.get("database") 32 database = self.para.get("database")
33 encryption = int(self.para.get("encryption","0")) 33 encryption = int(self.para.get("encryption","0"))
34 - if encryption: 34 + if encryption == 1:
35 # passwd = DES.decode(passwd) 35 # passwd = DES.decode(passwd)
36 passwd = AESHelper.decode(passwd) 36 passwd = AESHelper.decode(passwd)
37 37
@@ -26,7 +26,7 @@ class Api(ApiTemplate): @@ -26,7 +26,7 @@ class Api(ApiTemplate):
26 database = self.para.get("database") 26 database = self.para.get("database")
27 27
28 encryption = int(self.para.get("encryption", "0")) 28 encryption = int(self.para.get("encryption", "0"))
29 - if encryption: 29 + if encryption == 1:
30 #passwd = DES.decode(passwd) 30 #passwd = DES.decode(passwd)
31 passwd = AESHelper.decode(passwd) 31 passwd = AESHelper.decode(passwd)
32 32
注册登录 后发表评论