Skip to content

Instantly share code, notes, and snippets.

@grim-reapper
Forked from AndrewChamp/hashing.php
Created December 24, 2018 06:12
Show Gist options
  • Select an option

  • Save grim-reapper/59def7c8448a0a14884a017017cbfdb1 to your computer and use it in GitHub Desktop.

Select an option

Save grim-reapper/59def7c8448a0a14884a017017cbfdb1 to your computer and use it in GitHub Desktop.
Simple Hashing
<?php
function hasher($password, $salt){
$result = base64_encode(hash('md5', $password.$salt));
$result = substr($result, 5, -5);
return strrev($result);
}
//Example
print hasher('myPassword', time());
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment