It's not a secret anymore!
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 Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "encryption/decryption in servlets" Watch "encryption/decryption in servlets" New topic

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- cryptography possible in servlets?
2.what packages/APIs can be used to carry out RSA encryption/decryption?

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63874

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] [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

Joined: Mar 22, 2005
Posts: 42965
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.
I agree. Here's the link:
subject: encryption/decryption in servlets
It's not a secret anymore!