commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: [compress] Strong Crypto in Tests
Date Wed, 23 Oct 2013 11:03:56 GMT
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-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message