Solved

How to encrypt data in Java

Posted on 2008-09-30
2
979 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
word0 challenge 3 58
best (free) software to access postgres db (java) 1 18
Python Assistance 7 36
Java DateChooser? 2 13
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

759 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now