mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-22 16:33:00 +00:00
Comment verify_password
This commit is contained in:
parent
c64aaa72db
commit
62dff18b4d
1 changed files with 6 additions and 1 deletions
|
@ -217,7 +217,12 @@ function hash_password($pass) {
|
||||||
$props["options"]
|
$props["options"]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Verifies a user's password against a pre-generated hash.
|
||||||
|
* @param string $pass The user's password.
|
||||||
|
* @param string $hash The hash to compare against.
|
||||||
|
* @return bool Whether the password matches the has or not.
|
||||||
|
*/
|
||||||
function verify_password($pass, $hash) {
|
function verify_password($pass, $hash) {
|
||||||
$pass_transformed = base64_encode(hash("sha384", $pass));
|
$pass_transformed = base64_encode(hash("sha384", $pass));
|
||||||
return password_verify($pass_transformed, $hash);
|
return password_verify($pass_transformed, $hash);
|
||||||
|
|
Loading…
Reference in a new issue