Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Encryption and decryption in servlet

 
jaffrin abdul salam
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,
I am using DES(Symmetric) to encrypt a data in a servlet and embed that encypted message in an applet to send it to browser.
So encrypting the data in an servlet works fine and also i am getting the encrypted message in an applet.
But In an applet when i try to decrypt it ,i al getting class not found Exception.This is the error I am getting.
java.lang.NoClassDefFoundError: javax/crypto/KeyGenerator

at java.lang.Class.newInstance0(Native Method)

at java.lang.Class.newInstance(Unknown Source)

at sun.applet.AppletPanel.createApplet(Unknown Source)

at sun.plugin.AppletViewer.createApplet(Unknown Source)

at sun.applet.AppletPanel.runLoader(Unknown Source)

at sun.applet.AppletPanel.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

Can anybody tell how to decrypt it in an applet.?
Thanks
jaffrin
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you made the required libraries available to the applet?
Are they in a place accessible from the web, where the applet can download them?
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
KeyGenerator has been part of the class libraries for a long time (since Java 1.4 I think). What JRE is used to run the applet - is it possibly quite old?
[ May 24, 2007: Message edited by: Ulf Dittmer ]
 
jaffrin abdul salam
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks..for all the replies..
Its working now.I included the following jar files in the applet jce1_2_2.jarS.jar,
US_export_policy.jarS.jar,
sunjce_providerS.jar,
local_policy.jarS.jar

These jar's is not in the old JRE's.


Thanks
Jaffrin
 
Would you turn that thing down? I'm controlling a mind here! Look ... look at the tiny ad ...
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!