File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Security and the fly likes encrypt- decrypt problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Security
Bookmark "encrypt- decrypt problem" Watch "encrypt- decrypt problem" New topic

encrypt- decrypt problem

Vikas Kumar Sahu
Ranch Hand

Joined: Dec 02, 2003
Posts: 59
Hi, All,
I want to encrypt my password text and want to save into database and I want to fetch that password from database and decrypt and want to mach.
Give some link or docs link for overcom my this problem , I m very new for that.
Michael Ernest
High Plains Drifter

Joined: Oct 25, 2000
Posts: 7292

Moving to the Security forum.

Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
norman richards
Ranch Hand

Joined: Jul 21, 2003
Posts: 367
Do you really want to decrypt and compare or only compare? If it is the latter, you should use a hash function and not use uncryption. Many databases have both hash and encrypt/decrypt functions built in. If you want to do it in Java (It's not that hard, but I don't recommend it if you don't have some previous experience in cryptopraphy) then look at the JCE.
I would recommend the book Translucent Databases. It's way more information than you need, but it has some code samples for doing hashing and encryption/decryption both in the database and in SQL.
I agree. Here's the link:
subject: encrypt- decrypt problem
jQuery in Action, 3rd edition