AES encrypt in cryptojs and decrypt in python Crypto.Cipher

泄露秘密 提交于 2019-12-04 13:51:29

Try with an IV that has actually the same size as the block size of AES, 16 bytes. You are currently specifying 8 bytes in hexadecimals. CBC mode requires an IV of the same size as the block size and the Python API specifies (including final typo):

For all other modes, it must be block_size bytes longs.

It's best to use a method or (predefined) constant like above.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!