aspose 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
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: 60975
    
  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: 41467
    
  51
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 - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: encryption/decryption in servlets