It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Partner Sites
Board index Programming Java Forum

Java Encryption and Decryption

Java Encryption and Decryption

Postby devtamil on Thu May 24, 2007 5:17 am

Hai,

I am new java developer. Now i am doing one struts application.

In my application, at the User registration time, i need to Encrypt the password field and then i like to store into the database.


After that the same user will be logging, at the moment the database password will decrypt and it will be compare to the User entering password.


If both password's are equal, then only the User will allow the logging.


can anybody know or have any sample code for Encrypt and Decrypt.

If yes, kindly post me, my mail id is tamilvanan@veradistech.com.

I am expecting anyone's reply.


Thanks

Tamilvanan
devtamil
 
Posts: 8
Joined: Mon May 14, 2007 6:06 am

Postby meongmania on Mon Jun 11, 2007 11:11 am

use a DES or 3DES related classes, after you define the encryption key they will encrypt the data for you. Many people uses MD5 hash function as a tool for encryption. DON'T do things like that! Encryptions are different than Integrity checks, MD5 is a hash function, means it is not an encryption.
meongmania
 
Posts: 16
Joined: Tue Dec 19, 2006 3:58 am


Return to Java Forum

Who is online

Users browsing this forum: No registered users and 0 guests