starting with encryption

Hi all,

I am using a form to get user name and password . I want to encrypt it and store in db and in future if the same user enters password then the already encrypted password should be decrypted and matched.

i am quite new to encryption and decryption and don't know any java classes for that purpose.

Will anyone be kind enough to provide me the sample code or details? it will help me immensely.

regards....

[444 byte] By [deepak_anuraga] at [2007-11-26 22:49:37]
# 1
http://java.sun.com/j2se/1.5.0/docs/guide/security/jce/JCERefGuide.html
ghstarka at 2007-7-10 12:10:12 > top of Java-index,Security,Cryptography...
# 2

> Hi all,

>

> I am using a form to get user name and password . I

> want to encrypt it and store in db and in future if

> the same user enters password then the already

> encrypted password should be decrypted and matched.

>

> i am quite new to encryption and decryption and don't

> know any java classes for that purpose.

>

> Will anyone be kind enough to provide me the sample

> code or details? it will help me immensely.

>

> regards....

I would highly recommend instead of:

..if the same user enters password then the already encrypted password should be decrypted and matched..

you should do:

..your program encrypts same user's password entry, and it must match with the encrypted password you already have for the user.

Normally for password, it should be one way encryption, so no one can ever decrypt it. If the user lost the password, then the system should regenerate a new one.

yue42a at 2007-7-10 12:10:12 > top of Java-index,Security,Cryptography...