maybe I have the concept of hashing wrong, but when I hash my passwords and salt them I get one string, and when I go to log in the newly signed up user I apply the same method on the password they used to sign up to log in. If I understand hashing right, shouldn't the hashs be exactly the same when I go to compare them? It always turns out that they are different so the user can't ever log in.
here is the method I'm using for hashing
$pass = "password"
$salt = "key";
$newpass = md5($key.$pass);
and then when I go to access the password I just take the inputed password apply the same method to it and then check if the one in the database is the same as the generated one, but they aren't ever the same as each other, the one in the database is always the same and the one generated is always the same but they aren't ever equal.
MD5()function, i tried to explain the important points in this article. – martinstoeckli Aug 16 '12 at 8:09