Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Encryption/Decryption of password

 
PRavi kumar
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,

I need to encrypt the password and store in oracle data base.

when you enter the password through I need to get the encrypted password from data base and decrypt and compare and for user login.

kindly let me know which is the best approch do this. kindly provide the sample programs how i can do.


Thanks in advance.

Regards,
Ravi.
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't do it that way.
what you want to do is push the password through a HMAC and store the results. Then when someone wants to login, get their password, push it through the same HMAC and compare the results.

A HMAC with SHA1 will do the job.
There are RFCs defining the standard way, and the java.crypto classes have the SHA code.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic