Jan 15, 2009

How to store passwords in database? How to use them? How to store SSN in database? Is there difference? Hint: Do you really want to see the actual pas

How to store passwords in database? How to use them? How to store SSN in database? Is there difference? Hint: Do you really want to see the actual password when they are retrieved? Do you want to see SSN when they are retrieved?

You cannot see the password, so you should hash the password and store the hashed password in the database associated with user id, when you login, input the user id and password, get the hashed password based on the user id, and hash the new input password, then compare the hashed password from database to the hashed input password, if equal, perform a successful login. Why not use encryption on the password

No comments:

Post a Comment