Created
September 20, 2017 08:07
-
-
Save MichaelF25/a360d068780366c79d69ad3c92814fb4 to your computer and use it in GitHub Desktop.
Check if JCE is installed in Java / JRE / JDK
This file contains hidden or 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; | |
class Test { | |
public static void main(String[] args) { | |
try { | |
int maxKeyLen = Cipher.getMaxAllowedKeyLength("AES"); | |
System.out.println("JCE installed: ".concat(String.valueOf(maxKeyLen >= 256))); | |
} catch (Exception e){ | |
System.out.println(e); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment