Skip to content

Instantly share code, notes, and snippets.

@devalexluna
Created May 12, 2017 11:00
Show Gist options
  • Save devalexluna/70525149b5ef2738301edc2e3943b27e to your computer and use it in GitHub Desktop.
Save devalexluna/70525149b5ef2738301edc2e3943b27e to your computer and use it in GitHub Desktop.
Basic Password Hash
<?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