Verify that Password Matches Argon2i Hash using PHP

password_verify function

<?php

$password = 'Hello';
$passwordHash = '$argon2i$v=19$m=65536,t=4,p=2$bXVoQnQzaG44SmNBdGozVg$EZnL39Yuww+IEs03LX1M48K9lz8XvXgD9uWsIbmh27E';
$isValid = password_verify($password, $passwordHash);

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

Leave a Comment

Cancel reply

Your email address will not be published.