Password Hasher

📚 This tool accompanies the lessons on mr.napper.au

Generate Password Hash

Password

Verify Password

Password Hash

Important Note

Every time you generate a hash for the same password, the output will be different. This is normal behaviour and is one of the security features of password_hash().

Example PHP Code

Generating a Hash

$password = "hunter2";

$hash = password_hash(
    $password,
    PASSWORD_DEFAULT
);

echo $hash;

Verifying a Password

if(password_verify($password,$hash))
{
    echo "Correct";
}
else
{
    echo "Incorrect";
}

📚 Learn more on mr.napper.au