Created
September 27, 2019 16:44
-
-
Save nicordev/856257233bd6f23c22cd1e58c4246223 to your computer and use it in GitHub Desktop.
Hash a password using php in the command line
This file contains hidden or 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 | |
echo "Password: "; | |
fscanf(STDIN, "%s\n", $password); | |
echo "$password\nHash using password_hash() and PASSWORD_DEFAULT: "; | |
echo password_hash($password, PASSWORD_DEFAULT); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment