last block incomplete with CipherInputStream/CipherOutputStream, even with padding AES/CBC/PKCS5Padding

后端 未结 6 2121
自闭症患者
自闭症患者 2020-12-28 18:06

Actually, I searched lot from internet and in stackoverflow too for this,

Initially I don\'t used padding in my encryption and decryption,

But Finally I got

6条回答
  •  既然无缘
    2020-12-28 18:56

    Finally I got answer for my own question, with trial and error Actually here Conflict is I set Padding in encipher = Cipher.getInstance("AES/CBC/PKCS7Padding");

    and Set IV with some values.....,

    Finally I got Answer only just replaced the Algorithm

    From:

    AES/CBC/PKCS7Paddinng

    To:

    AES/CFB8/NoPadding

    and its worked like charm...., So I suggest this answer for others who struggling with this problem, if you solved you problem, mention here for others...

提交回复
热议问题