Solved

How to encrypt data in Java

Posted on 2008-09-30
2
983 Views
Last Modified: 2013-12-22
This might be a dumb question, but can someone provide some sample code that encrypts data in Java?  I have a public key that I'm suppose to use if that helps.  thanks
0
Comment
Question by:jhughes4
2 Comments
 
LVL 59

Accepted Solution

by:
Kevin Cross earned 250 total points
ID: 22609898
There are some API's for doing this including the javax.crypto package.

http://java.sun.com/j2se/1.4.2/docs/api/javax/crypto/package-summary.html

Take a look at KeyGenerator and Cipher classes to get started.

Here is an example of another method provided by the Java Cryptography Extensions (JCE):
http://archive.javapronews.com/javapronews-47-20040625EncryptSensitiveConfigurationDatawithJava.html

Regards,
Kevin



Regards,
Kevin
0
 
LVL 23

Assisted Solution

by:Ajay-Singh
Ajay-Singh earned 250 total points
ID: 22611311
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
expectj telnet failing 5 45
Is Applet the way to go for my drag and drop system? 8 25
java imports not found 4 30
Java Eclipse Loop 3 21
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question