Created
May 6, 2014 08:37
-
-
Save olim7t/c9e70785bd7b6f135552 to your computer and use it in GitHub Desktop.
Check if the JCE with unlimited strength is installed (via http://stackoverflow.com/questions/11538746/check-for-jce-unlimited-strength-jurisdiction-policy-files)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.crypto.Cipher; | |
public class CheckJceUnlimited { | |
public static void main(String[] args) throws Exception { | |
int maxAesLength = Cipher.getMaxAllowedKeyLength("AES"); | |
boolean unlimited = maxAesLength > 128; | |
System.out.println("JCE unlimited strength enabled: " + unlimited); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment