PHP Classes

Alex J Mcl

Recommend this page to a friend!

      Simple PHP MVC Framework  >  All threads  >  Alex J Mcl  >  (Un) Subscribe thread alerts  
Subject:Alex J Mcl
Summary:Bug??? Or create yourself?
Messages:2
Author:Alex
Date:2022-07-21 10:15:35
 

  1. Alex J Mcl   Reply   Report abuse  
Picture of Alex 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

  2. Re: Alex J Mcl   Reply   Report abuse  
Picture of Alex Alex - 2022-07-21 10:23:41 - In reply to message 1 from Alex
Sorry. I saw that the built-in function in php is used.