?
Solved

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

Posted on 2004-11-08
7
Medium Priority
?
2,772 Views
Last Modified: 2011-09-20
Hello,

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

Siddhartha
0
Comment
Question by:mehtas
  • 4
  • 2
7 Comments
 
LVL 35

Expert Comment

by:girionis
ID: 12523787
The implementation you are trying to access is simply not available.
0
 
LVL 2

Author Comment

by:mehtas
ID: 12523870
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?
0
 
LVL 35

Expert Comment

by:girionis
ID: 12523879
> 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
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 35

Expert Comment

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

Which means jce 1.2
0
 
LVL 35

Accepted Solution

by:
girionis earned 375 total points
ID: 12523894
Sorry, wrong suggestion, AES is only available from jdk *1.4.2* and onwards.
0
 
LVL 16

Expert Comment

by:gnoon
ID: 12529472
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.
0
 
LVL 16

Expert Comment

by:gnoon
ID: 12529511
I can use both AES/ECB/PKCS5Padding and Rijndael/ECB/PKCS5Padding with j2sdk1.4.2-b28.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Suggested Courses
Course of the Month15 days, 16 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question