MCPcopy Index your code
hub / github.com/smallfawn/QLScriptPublic / aesDecrypt

Function aesDecrypt

backup/sysxc.py:110–123  ·  view source on GitHub ↗

:param key: 密钥 :param data: 加密后的数据(密文) :return:明文

(key, data)

Source from the content-addressed store, hash-verified

108
109
110def aesDecrypt(key, data):
111 '''
112 :param key: 密钥
113 :param data: 加密后的数据(密文)
114 :return:明文
115 '''
116 key = key.encode('utf8')
117 data = base64.b64decode(data)
118 cipher = AES.new(key, AES.MODE_ECB)
119
120 # 去补位
121 text_decrypted = unpad(cipher.decrypt(data))
122 text_decrypted = text_decrypted.decode('utf8')
123 return text_decrypted
124
125
126def checkVCode(pointJson, token):

Callers 1

mainFunction · 0.85

Calls 2

unpadFunction · 0.85
decryptMethod · 0.45

Tested by

no test coverage detected