Verify that Password Matches bcrypt Hash using PHP

password_verify function

<?php

$password = 'Hello';
$passwordHash = '$2b$14$4Xq60qoHFfSNmcio3N2DzOOuqO0etK7t3qXyKvbPG.4xh24Zlh6Hq';
$isValid = password_verify($password, $passwordHash);

echo $isValid ? 'True' : 'False';

Leave a Comment

Cancel reply

Your email address will not be published.