File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes encryption/decryption in servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "encryption/decryption in servlets" Watch "encryption/decryption in servlets" New topic
Author

encryption/decryption in servlets

Ravindra Harige
Ranch Hand

Joined: Jun 10, 2005
Posts: 33
I want to encrypt a file using RSA (2048 bit key) in servlet program.I want to know-
1.is cryptography possible in servlets?
2.what packages/APIs can be used to carry out RSA encryption/decryption?


regards
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60048
    
  65

Servlets are normal Java classes that just happen to be executed by a servlet container. I'm going to move this to a general forum as the fact that you're in a servlet is rather irrelevant. In fact, good design would dictate that such tasks would be delegated to normal java classes in any case, rather than in code within the servlet.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ravindra Harige
Ranch Hand

Joined: Jun 10, 2005
Posts: 33
Sorry Bear.I posted this query in servlets forum 'cos i thought the approach to implement cryptography in servlets'd be different than in normal java classes.Anyways,i'm looking forward for response from this forum
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39544
    
  27
Cryptographic algorithms are built into Java. The relevant API is called "JCE", and you can find a number of links about it here, including round-trip en-/decryption.


Ping & DNS - updated with new look and Ping home screen widget
 
Don't get me started about those stupid light bulbs.
 
subject: encryption/decryption in servlets
 
Similar Threads
problem in encryption of ZIP files.
Proj: Chatting Application
difference between MD5withRSA and RSA?
SSL of J2ME on Palm under KVM
Elliptic Curve Cryptography