Created
March 16, 2017 18:25
-
-
Save hansdg1/0ac99910b447bf99dddb31e77491b481 to your computer and use it in GitHub Desktop.
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; | |
class CipherTest { | |
public static void main(String args[]) { | |
try { | |
int maxKeyLen = Cipher.getMaxAllowedKeyLength("AES"); | |
if(maxKeyLen < 256) { | |
System.out.println("FAILED: Max key length too small! (" + maxKeyLen + ")."); | |
} else { | |
System.out.println("PASSED: Max key length OK! (" + maxKeyLen + ")."); | |
} | |
} catch(Exception e) { | |
System.out.println("FAILED: No AES found!"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment