javax.crypto.BadPaddingException: Not PKCS#1 block type 2 or Zero padding

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 Oracle Community by 843810, 1 year ago
Not PKCS#1 block type 2 or Zero padding
via Coderanch by David Fahy, 1 year ago
Not PKCS#1 block type 2 or Zero padding
via Oracle Community by 843811, 1 year ago
Not PKCS#1 block type 2 or Zero padding
via oracle.com by Unknown author, 1 year ago
Not PKCS#1 block type 2 or Zero padding
via hivmr.com by Unknown author, 1 year ago
Not PKCS#1 block type 2 or Zero padding
via oracle.com by Unknown author, 1 year ago
Not PKCS#1 block type 2 or Zero padding
javax.crypto.BadPaddingException: Not PKCS#1 block type 2 or Zero padding
at com.ibm.crypto.provider.RSA.engineDoFinal(Unknown Source)
at javax.crypto.Cipher.doFinal(Unknown Source)
at undefined.encryptdata_.readkey(encryptdata_.java:98)
at undefined.encryptdataClient_.main(encryptdataClient_.java:19)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago

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