Created
February 7, 2018 19:24
-
-
Save glenntnorton/d7cb608f5e5bd22b06b15b25ac9b1015 to your computer and use it in GitHub Desktop.
Quick PHP Password Hashing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$passwd = "swordfish"; | |
$phash = password_hash($passwd, PASSWORD_DEFAULT); | |
if(password_verify($passwd, $phash)) { | |
echo "passwords match\n"; | |
} | |
else { | |
echo "passwords do not match\n"; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment