PHP hashing function not working properly
- by Jordan Foreman
So I read a quick PHP login system securing article, and was trying to sort of duplicate their hashing method, and during testing, am not getting the proper output.
Here is my code:
function decryptPassword($pw, $salt){
$hash = hash('sha256', $salt . hash('sha256', $pw));
return $hash;
}
function encryptPassword($pw){
$hash =…