Vishal Mahajan wrote:
Dominik Schadow wrote:

Yes, I tried the following code:

SecretKeySpec keySpec = new
SecretKeySpec(JavaUtils.getBytesFromFile(keyFile), algorithm);
SecretKey key = skf.generateSecret(keySpec);


The exception I receive is

java.security.NoSuchAlgorithmException: AES not found
at javax.crypto.SecretKeyFactory.getInstance(SecretKeyFactory.java:86)

I think the problem is that you don't have a JCE provider in your jre that supports AES key generation this way. I am not sure which provider supports it.

Sun's JCE provider supports AES with J2SE/JDK 1.4.2 and up.

--Sean

Reply via email to