Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to encrypt data in Java

Posted on 2008-09-30
2
Medium Priority
?
1,002 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 60

Accepted Solution

by:
Kevin Cross earned 1000 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 1000 total points
ID: 22611311
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
In this post we will learn different types of Android Layout and some basics of an Android App.
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 …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

885 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