Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A properly implemented use of password_hash() would also allow them to use the same field and code for different algorithms over time.

What I mean is, the stored data contains which algorithms it is. So they can in their code or configuration change which algorithms to use and how many times it should hash. Then on login they can verify the password against the hash and also check if the stored hash needs to be rehashed against the current set settings, then it can create a new hash from the password the user entered on login and store that in the database.

Then you get automatic hash upgrades to match the current settings of the hashing of the passwords on the site with basically no user interaction (other than the act of logging in to have the password in plain text).



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: