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

So you are supposed to md5 the results of the password_hash() function before storing them in a database right?


Don't forget double rot13.


It's actually called ROT26: "An encryption scheme similar to ROT13, but twice as secure."


For those who may not get this joke:

# One rot13

$ echo test | wm --rot13 --words stdin

grfg

# Double rot13

$ echo test | wm --rot13 --words stdin | wm --rot13 --words stdin

test


Of course! It totally adds another layer of protection :)


If this was NOT a joke...

No, do not md5 as you will lose hash type info.

edit: To be clear I am assuming it IS a joke. I hope.. oh god I hope.


Why would you even worry about it not being a joke? Even if by some quirk of fate they were serious, the code would immediately fail and put no data at risk.


My hopes weren't with the code, but with the fact that it is explained in the article.


No, this is totally insecure. You're supposed to generate a public/private key pair for the user, encrypt the hash with the public key and store the private key in a separate database on a separate server that isn't connected to the internet and doesn't allow remote log-in from the lan.




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

Search: