eskimmer 0 Report post Posted August 16, 2007 How should I hash passwords? Just use crypt? Use crypt with one of the other encryptions? Something else? Share this post Link to post Share on other sites
shadowx 0 Report post Posted August 16, 2007 Well using crypt wouldnt "hash" anything i would encrypt it as i understand. I would usually use MD5 to has a password, the only thing is once hashed you cant see the original password, this doesnt matter really though as to validate the password you store the hashed version in a DB and then hash the users input so that if correct the two hashes would match exactly. That way even if the site is compromised by a hacker and they get access to the DB they still cant see the passwords either! Share this post Link to post Share on other sites
t3jem 0 Report post Posted August 17, 2007 I would use MD5 too, I forget the php function that can actually hash a password to md5, but yea, it's an easy way to do it; however, it's not hard to find a program that will crack the hash if a hacker find the hashed password so don't make the hash easy to find. Share this post Link to post Share on other sites
Codemaster Snake 0 Report post Posted August 22, 2007 Check out the following code: <?php$password = "PASSWORD"; // Any password$crypt = md5($password); // You will get a md5 hash of your supplied string/* * You can insert the data in to table and check with the entered password during login */?> md5() returns a 32 character long string which is always unique and same for the supplied argument.If you need more help the post Notice from rvalkass: Any code you post must be placed in CODE tags. Share this post Link to post Share on other sites