Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

encryption/decryption in servlets

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Marshal
Posts: 67426
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ravi Ramnath
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Whatever. Here's a tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic