- hash: documentation ( source)
<?php
// This is stored in the file:
$storedhash = hash("sha256", "salt" + "password");
// Logging in:
$password = "passworld";
if (hash("sha256", "salt" + $password) === $storedhash)
{
echo "Successfully entered password";
} else {
echo "Nofie.";
}