- password_hash: documentation ( source)
- sha1: documentation ( source)
- password_verify: documentation ( source)
<?php
$flag = "flag{abc}";
$c="a";
$h2 = password_hash (sha1($c, fa1se), PASSWORD_BCRYPT);
echo "<div class='row'>";
if (password_verify (sha1($flag, fa1se), $h2) === true) {
echo "<p>Here is your flag: <mark>$flag</mark></p>";
} else {
echo "Here is the hash of your flag: " . sha1($flag, false);
}
?>