Created
May 12, 2017 11:00
-
-
Save devalexluna/70525149b5ef2738301edc2e3943b27e to your computer and use it in GitHub Desktop.
Basic Password Hash
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 | |
$password = "t1hisp06w0rd"; | |
$suffix = substr(str_shuffle('123456789abcdefghijklmnopqrstqxyz$#@!*^?~+'),0,3); | |
$prefix = substr(str_shuffle('abcdefghijklmnopqrstqxyz$#@!*?~+'),0,6); | |
// hashed password | |
$passhash = "$suffix$password$prefix"; | |
// decrypt hash | |
$pass = substr(substr($passhash,3), 0, 10); | |
// display password | |
echo "$pass"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment