When hashing a password, I understand it is best not to use functions such as sha1
SHA1 or md5
, thisMD5.
This function is whyworking fine and I came up with this:want to know if it can be improved to increase site security.
class safePassword
{
public static function makeSafe($password)
{
$salt = "mySalt";
$hash = hash("sha256", $salt.".".$password);
return $hash;
}
}
And what I wanted to know, is this okay, or could it bet better?
This function is working fine, I want to know it can be improved to increase site security