Hacker News new | past | comments | ask | show | jobs | submit login
The Art of Password Protection in PHP (imageshack.us)
1 point by bkhl on Feb 24, 2011 | hide | past | favorite | 5 comments



"And then I stopped dicking around and used solar designer's phpass..."

     function generateHash($pwd) {
       $h = new PasswordHash(8, false);
       return $h->HashPassword($pwd);
     }


I hope no one is doing anything involving passwords in PHP.


Sorry, I can't seem to find the point you're trying to make under the snark... did you forget to add one?

If one were feeling really unkind, one could note that languages at the opposite end of the spectrum to PHP tend bring about this tendency - maybe you need some kind of snark compiler to enforce this kind of thing so that you don't have to rely on expertise?


Password protection shouldn't be done in the presentation layer, regardless of language.


...and then i wanted to email the passwords back to my users in regular intervals and went back to step one.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

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

Search: