AES cbc padding encryption/decryption on cross platform (.net c# and codename one bouncy castle)

自古美人都是妖i 提交于 2019-12-06 04:17:15

This issue has been fixed...it is just key/IV bytes issue.as in .net there is same key and IV when in java i have used different IV.

correction in java code:

instead of this

byte key[] = "MAKV2SPBNI992122".getBytes("UTF-8");
byte[] iv = new byte[16];

use this.

byte key[] = "MAKV2SPBNI992122".getBytes("UTF-8");
byte[] iv =  "MAKV2SPBNI992122".getBytes("UTF-8");
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!