1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-11-22 04:23:01 +00:00

Comment verify_password

This commit is contained in:
Starbeamrainbowlabs 2018-05-11 11:36:29 +01:00
parent c64aaa72db
commit 62dff18b4d
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -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);