Skip to content

Instantly share code, notes, and snippets.

@zznate
Created May 23, 2013 17:18
Show Gist options
  • Save zznate/5637756 to your computer and use it in GitHub Desktop.
Save zznate/5637756 to your computer and use it in GitHub Desktop.
/etc/alternatives/jre_1.7.0/bin/java CryptTest test
original: test
encrypted: ڝ8?p??7m?Q(7??
Exception in thread "main" java.lang.IllegalStateException: javax.crypto.BadPaddingException: Invalid pad value!
at CryptTest.decrypt(CryptTest.java:67)
at CryptTest.main(CryptTest.java:25)
Caused by: javax.crypto.BadPaddingException: Invalid pad value!
at sun.security.pkcs11.P11Cipher$PKCS5Padding.unpad(P11Cipher.java:106)
at sun.security.pkcs11.P11Cipher.implDoFinal(P11Cipher.java:893)
at sun.security.pkcs11.P11Cipher.engineDoFinal(P11Cipher.java:552)
at javax.crypto.Cipher.doFinal(Cipher.java:2217)
at CryptTest.decrypt(CryptTest.java:63)
... 1 more
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment