
Alex - 2022-07-21 10:15:35
class Controller.
<pre>
/**
* Hash Password
* @param String|Integer $value Password
* @return String Hashed Password
*/
public function hashMake( $value )
{
return password_hash( $value, PASSWORD_DEFAULT );
}
/**
* Verify Hashed Password
* @param String|Integer $value Password
* @param String $hash Hashed Password
* @return Boolean True If Verified, Otherwise false
*/
public function hashVerify( $value, $hash )
{
return password_verify( $value, $hash );
}
</pre>
I did not find two functions that check the password. Creating a hash and checking it against the generated hash made from the user's entered password