Skip to content

Instantly share code, notes, and snippets.

@glynrob
Created October 19, 2013 18:01
Show Gist options
  • Save glynrob/7059295 to your computer and use it in GitHub Desktop.
Save glynrob/7059295 to your computer and use it in GitHub Desktop.
Hashing in PHP
$md5 = md5($password.$salt);
echo "MD5 = $md5<br />";
$sha1 = sha1($password.$salt);
echo "SHA1 = $sha1<br />";
$sha512 = hash('sha512', $password.$salt);
echo "SHA512 = $sha512<br />";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment