-
Notifications
You must be signed in to change notification settings - Fork 107
Open
Description
Hi,
I am getting issue at line
cipher.init(Cipher.DECRYPT_MODE, new SecretKeySpec(KEY, "AES"), new IvParameterSpec(IV));
Error :
java.security.InvalidKeyException: Illegal key size
at javax.crypto.Cipher.checkCryptoPerm(Cipher.java:1039)
at javax.crypto.Cipher.init(Cipher.java:1393)
at javax.crypto.Cipher.init(Cipher.java:1327)
After debugging i came to know that
int maxKeyLen = Cipher.getMaxAllowedKeyLength("AES");
maxKeyLen = 128, but it should be 256.
The above error get fixed after replacing 2 jar files "local_policy.jar" and "US_export_policy.jar". Is there any way where we can fix this without doing this change
Metadata
Metadata
Assignees
Labels
No labels