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

后端 未结 6 2135
自闭症患者
自闭症患者 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:47

    I've seen CipherInputStream fail with padding problems too. This behaviour varied across different versions of the JVM. Eg 7u55 32 bit my code worked fine, 7u55 64 bit same code failed... and I also saw failures on later 32 bit JVMs. Workaround was to use byte array methods and avoid CipherInputStream.

提交回复
热议问题