raga
asked on
Regarding javax.crypto.Cipher
I am using a package javax.crypto.Cipher in my class for encryption. I am having a line Cipher.getInstance("DES/EC B/PKCS5Pad ding");
in my code.
I am importing the javax.crypto.* package in the class and i am also providing the jar file jce1_2-do.jar in the exact path, which contains Cipher class. But still when a run my application, i am getting NoSunchAlogrithmException, it says algorithm DES not available. Does any one knows, whatz the problem in this case ?.
in my code.
I am importing the javax.crypto.* package in the class and i am also providing the jar file jce1_2-do.jar in the exact path, which contains Cipher class. But still when a run my application, i am getting NoSunchAlogrithmException,
ASKER
hi sanjay,
thanx for your comments. I have security.provider.1=sun.se curity.pro vider.Sun in my java.security file (/lib/security). I am using Win NT workstation. I have changed the java.security file in the JDK directory also and jar is also provided in the correct path (/lib/ext), but still i am getting the problem. Can u please help ?.
thanx for your comments. I have security.provider.1=sun.se
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi
In my java.security file, i have following lines
security.provider.1=sun.se curity.pro vider.Sun
security.provider.2=com.su n.rsajca.P rovider
security.provider.3=com.is networks.c rypto.jce. ISNetworks Provider
and the jar file (jce1_2-do.jar) is provided by client. I have tried with putting the jar file in the path specified by u.
But still i am facing the same problem.
Can u please help?.
In my java.security file, i have following lines
security.provider.1=sun.se
security.provider.2=com.su
security.provider.3=com.is
and the jar file (jce1_2-do.jar) is provided by client. I have tried with putting the jar file in the path specified by u.
But still i am facing the same problem.
Can u please help?.
ASKER
Thanx alot sanjay for the help.
Yes, it was the problem of provider.
Once again thanx alot.
Yes, it was the problem of provider.
Once again thanx alot.
ASKER
Thanx alot sanjay
your jre path /lib/security
there is java.security file
check if this line is there
security.provider.1=sun.se
when you ask for an implementation of a cryptic
algorithm the VM will query the providers in this file
for the implementation
if you are using Windows
then you need to change the java.security file
in your JDK directory as well
if you have installed JCE as an extension
then the JAR should be copied in lib/ext
hope this helps you troubleshoot