Created
March 15, 2013 06:23
Revisions
-
jehrhardt created this gist
Mar 15, 2013 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ import javax.crypto.Cipher; import java.security.NoSuchAlgorithmException; public class KeyLengthDetector { public static void main(String[] args) { int allowedKeyLength = 0; try { allowedKeyLength = Cipher.getMaxAllowedKeyLength("AES"); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); } System.out.println("The allowed key length for AES is: " + allowedKeyLength); } }