You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting javax.crypto.BadPaddingException: pad block corrupted when BouncyCastle is on the classpath at runtime but not when the license is generated.
I'm getting
javax.crypto.BadPaddingException: pad block corrupted
when BouncyCastle is on the classpath at runtime but not when the license is generated.The reason is this code:
in Encryptor.java which will sometimes return a factory which uses a provider from SunJCE and sometimes one which uses BC provider.
The BC provider will return a different
shortKey
and eventually,decryptRaw()
will fail with the error above.I don't know a workaround. A fix is to replace the code above with
to lock down the provider or to introduce a new System property / global config variable to select the preferred provider.
The text was updated successfully, but these errors were encountered: