Link to home
Start Free TrialLog in
Avatar of mehtas
mehtas

asked on

Cipher.getInstance("AES/ECB/PKCS5Padding") not available

Hello,

Can anyone tell me ASAP of why would this error occur? Also what J2SDK have begun to add support for this?

Siddhartha
Avatar of girionis
girionis
Flag of Greece image

The implementation you are trying to access is simply not available.
Avatar of mehtas
mehtas

ASKER

What do you mean by that? Can you please explain?

I have this thing working on my machine wherein I get the instance of Cipher. And I have j2sdk1.4.2_03 on my machine.

This application throws the exception below on other machine which has got a different version of java:

Algorithm (AES/ECB/PKCS5Padding) is not available - Algorithm AES not available

Does that provide any hint?
> I have this thing working on my machine wherein I get the instance of
> Cipher. And I have j2sdk1.4.2_03 on my machine.

Yes, AES is only available from 1.4 and onwards: http://java.sun.com/products/jce/index-14.html
> Yes, AES is only available from 1.4 and onwards:
http://java.sun.com/products/jce/index-14.html

Which means jce 1.2
ASKER CERTIFIED SOLUTION
Avatar of girionis
girionis
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Checks on file C:\j2sdk1.4.2\jre\lib\security\java.security has something like this

security.provider.4=com.sun.crypto.provider.SunJCE

The number isn't 4 is fine, and checks for file C:\j2sdk1.4.2\jre\lib\ext\sunjce_provider.jar exists on path.

P.S. JAVA_HOME is C:\j2sdk1.4.2 by assume.
I can use both AES/ECB/PKCS5Padding and Rijndael/ECB/PKCS5Padding with j2sdk1.4.2-b28.