Verify that Password Matches Argon2id Hash using PHP

password_verify function

<?php

$password = 'Hello';
$passwordHash = '$argon2id$v=19$m=65536,t=4,p=2$Sk05cXZxbUhJQ1E5em02dQ$K8U9+ltV14jERcG5v8fMpcRFg75dz49AipKwEQseuoc';
$isValid = password_verify($password, $passwordHash);

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

Leave a Comment

Cancel reply

Your email address will not be published.