javax.crypto.BadPaddingException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Encryption failed in Marshmallow
    via Stack Overflow by Geethu
    ,
  • AES Encryption Pad Block Corrupted
    via Stack Overflow by user3727970
    ,
  • Encryption error on Android 4.2
    via Stack Overflow by Robert Estivill
    ,
    • javax.crypto.BadPaddingException: pad block corrupted at com.android.org.bouncycastle.jcajce.provider.symmetric.util.BaseBlockCipher.engineDoFinal(BaseBlockCipher.java:854) at javax.crypto.Cipher.doFinal(Cipher.java:1340) at com.dhungana.aditya.myapplication.AESHelper.decrypt(AESHelper.java:54) at com.dhungana.aditya.myapplication.AESHelper.decrypt(AESHelper.java:27) at com.dhungana.aditya.myapplication.MainActivity.onCreate(MainActivity.java:27) at android.app.Activity.performCreate(Activity.java:5933) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2269) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2376) at android.app.ActivityThread.access$800(ActivityThread.java:147) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1281) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5253) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:948) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:743)

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    jk
    5 times, last one,