:param key: 密钥 :param data: 加密后的数据(密文) :return:明文
(key, data)
| 108 | |
| 109 | |
| 110 | def 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 | |
| 126 | def checkVCode(pointJson, token): |