php - How to verify an hashed password -


i using password_hash() function.

now works hash password, how verify it?

hope can me!

well function option called: password_verify.

how work this;

<?php $password = "[pass]"; //password user fill in. $hash= "[hash]"; //the hashed password saved. $checkpass = password_verify($password, $hash); //this returns boolean; true or false if ($checkpass == true) {   echo 'password good!'; } else {   echo 'password wrong!'; } ?> 

Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -