Check for JCE Unlimited Strength Jurisdiction Policy files [duplicate]

I found that it can be tested with the following code snippet:

    int maxKeyLen = Cipher.getMaxAllowedKeyLength("AES");
    System.out.println(maxKeyLen);

Without the unlimited strength policy files this results in 128, after they have been installed properly the result is 2147483647.

Leave a Comment