I use sha512.js file and for security purpose I send my password as a hash value with post request. Now I want to check with the saves hash password in the database. When I check my browser It can be seen password as a hash value. Then in my php file I get the password value with post request. then I want to check it with database saved value.
my post request password value like - 7d4ad2ce44e568064beb480525a563daf85c676795f4083b7e177553af273ffecff41c2bbbe64428d9c0ca37744bcea4de218d356037337bcd41129bb1681b13
$email = $_POST['email'];
$passwordFromPost = $_POST['p'];
// $passwordFromPost = '7d4ad2ce44e568064beb480525a563daf85c676795f4083b7e177553af273ffecff41c2bbbe64428d9c0ca37744bcea4de218d356037337bcd41129bb1681b13';
my database password is -:
$hashedPasswordFromDB = '$2y$11$2Nmsc11WWGZ1xEB8P3zWCezVv4QCe48BVQ8vJbXOkByUXIioWH.AS'
if (password_verify($passwordFromPost, $hashedPasswordFromDB)) {
echo 'Password is valid!';
} else {
how check post request hash value with db hash value.