AES/CBC/PKCS5Padding issue

前端 未结 2 1981
长发绾君心
长发绾君心 2021-02-06 17:08

I am trying to encrypt and decrypt some simple text. But for some reason I am getting a strange error: javax.crypto.BadPaddingException. Why would JCE generates byt

2条回答
  •  太阳男子
    2021-02-06 18:10

    You can forgo the calls to update and just pass the byte[] data directly to doFinal performing the operation of encrypting or decrypting in one step.

提交回复
热议问题