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:
byte[] shortKey = SecretKeyFactory.getInstance("PBEWithMD5AndDES").
generateSecret(keySpec).getEncoded();
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
byte[] shortKey = SecretKeyFactory.getInstance("PBEWithMD5AndDES", "SunJCE").
generateSecret(keySpec).getEncoded();
to lock down the provider or to introduce a new System property / global config variable to select the preferred provider.