dcsimg
Crypto error while using JCE!
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ashok_S
Posted On:   Wednesday, December 26, 2001 01:21 PM

Hi folks, Strange problem.. I have 2 web apps. In both the webapp I am using JCE with 'PBEWithMD5AndDES' alogorithm whcih uses a key file that I have generated. Now when both the web apps are deployed and I try creating a instance of the cipher inside both my apps I get an error : "Failed to getInstance of Cipher for algorithm 'PBEWithMD5AndDES' Class com.sun.crypto.provider.PBEWithMD5AndDESCipher configured for Cipher not a Cipher" After a little investigation it looks like once the Cipher is initialized in any of the web app, and when the other tries to initialize it, it bombs. Here are the other configura   More>>

Hi folks,
Strange problem..

I have 2 web apps. In both the webapp I am using JCE with 'PBEWithMD5AndDES' alogorithm whcih uses a key file that I have generated.


Now when both the web apps are deployed and I try creating a instance of the cipher inside both my apps I get an error :


			
"Failed to getInstance of Cipher for algorithm 'PBEWithMD5AndDES'


Class com.sun.crypto.provider.PBEWithMD5AndDESCipher configured for Cipher not a Cipher"



After a little investigation it looks like once the Cipher is initialized in any of the web app, and when the other tries to initialize it, it bombs.


Here are the other configuration:

1) Using Tomcat 3.3, JDK 1.3.1, Win 2k.

2) The JCE library are included in both the webapps WEB-INFlib directory so that they are loaded by their own classloaders.And so is the key file.

3) The 2nd webapp makes a call to the 1st webapp. And when the call to the 1st webapp happens the Crypto of the 1st webapp is kicked off. After the call is returned back to 2nd webapp, a call to a function within 2nd webapp kicks off the Cyrpto of 2nd webapp and the application bombs here.


I have no clue what the problem could be. Does the JVM allow only one instance of the Cipher to be configured?
So what are my alternatives? and I have to bundle the JCE jar with my application jar so that deployment is easy.



Can anyone help me...I am @ a deadend!
Thanx

   <<Less
About | Sitemap | Contact