Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to encrypt data in Java

Posted on 2008-09-30
2
Medium Priority
?
997 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

Question has a verified solution.

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

Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
A solution for Fortify Path Manipulation.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses

704 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