On 2013-10-23, Jörg Schaible wrote:

>  boolean supportedKeyLength(int keyLen) throws NoSuchAlgorithmException
>  {
>    if (Cipher.getMaxAllowedKeyLength("AES/ECB/PKCS5Padding") < keyLen) {
>      System.err.println("WARNING: " + getName()
>        + " not executed, environment does not support " + keyLen
>        + "-bit keys for AES");
>      return false;
>    }
>    return true;

Looks a lot nicer than my "catch Exception" approach, thanks.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to