java.io.IOException: javax.crypto.BadPaddingException: Given final block not properly padded

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Coderanch by Mandar Khire, 1 year ago
javax.crypto.BadPaddingException: Given final block not properly padded
via coderanch.com by Unknown author, 1 year ago
javax.crypto.BadPaddingException: Given final block not properly padded
via apache.org by Unknown author, 2 years ago
javax.crypto.IllegalBlockSizeException: Input length must be multiple of 16 when decrypting with padded cipher
via github.com by Unknown author, 1 year ago
javax.crypto.BadPaddingException: mac check in GCM failed
via Stack Overflow by Thunderforge
, 2 years ago
javax.crypto.BadPaddingException: Given final block not properly padded
via Apache's JIRA Issue Tracker by Tim Allison, 1 year ago
javax.crypto.BadPaddingException: Given final block not properly padded
java.io.IOException: javax.crypto.BadPaddingException: Given final block not properly padded
at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:966)
at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:824)
at com.sun.crypto.provider.DESCipher.engineDoFinal(DESCipher.java:314)
at javax.crypto.Cipher.doFinal(Cipher.java:2048)
at javax.crypto.CipherInputStream.getMoreData(CipherInputStream.java:118)
at javax.crypto.CipherInputStream.read(CipherInputStream.java:239)
at javax.crypto.CipherInputStream.read(CipherInputStream.java:215)
at encrypt_example.FileEncryption.decrypt(FileEncryption.java:75)
at encrypt_example.FileEncryption.main(FileEncryption.java:112)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 11 months ago
3 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 5 months ago
Samebug visitor profile picture
Unknown user
Once, 5 months ago
Samebug visitor profile picture
Unknown user
Once, 5 months ago
12 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.