sivam wrote
Thanks sanjay.
I've created a seperate table for storing the password history. But now, i need to know how to decrypt the password from that table. what is the function used to decrypt password and what is the key used?
|
Storing passwords as plaintext in a custom table creates FAR more of security risk than does preventing a user from using their last three passwords. Be careful here!
Far better would be to hash all of your passwords, and then just store the last three hashes. You'd then just need to do a simple string comparison of these values without worrying about decryption. If you must use encryption, encrypt the new password and compare (instead of decrypting and comparing).
I'm not generally a fan of one-off security extensions, so make sure you really need this functionality.
Brandon