python 解密用户信息异常
https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/signature.html 使用Python语言,解密用户信息时异常。时啥原因?网上很多同学都遇到了。 Traceback (most recent call last): File "demo.py", line 20, in <module> main() File "demo.py", line 17, in main print pc.decrypt(encryptedData, iv) File "/tmp/Python/WXBizDataCrypt.py", line 24, in decrypt print (cipher.decrypt(encryptedData)) File "/usr/lib64/python2.7/site-packages/Crypto/Cipher/_mode_cbc.py", line 246, in decrypt raise ValueError("Data must be padded to %d byte boundary in CBC mode" % self.block_size) ValueError: Data must be padded to 16 byte boundary in CBC mode