Wednesday, January 13, 2010

Using AES from Java

The following exception

java.security.InvalidKeyException: Illegal key size or default parameters
at javax.crypto.Cipher.a(DashoA13*..)
at javax.crypto.Cipher.a(DashoA13*..)
at javax.crypto.Cipher.a(DashoA13*..)
at javax.crypto.Cipher.init(DashoA13*..)
at javax.crypto.Cipher.init(DashoA13*..)
...

Searching java forums reveals that I need to download the Unrestricted Policy Files from JDK Distribution Center.

After much searching I found it at

Under Additional Resources/ Other Downloads.

Simply copy the jars included in it into %JRE_HOME%/lib/security overwriting what is there

On my system that means doing it in multiple locations (eclipse JRE/ Oracle JRE etc.) to make

No comments: