Skip to content

Instantly share code, notes, and snippets.

@smullins7
Created July 22, 2014 19:44
Show Gist options
  • Select an option

  • Save smullins7/da8a538ccda685494f12 to your computer and use it in GitHub Desktop.

Select an option

Save smullins7/da8a538ccda685494f12 to your computer and use it in GitHub Desktop.
php sha512 hash command line
<?php
echo "Enter your password:\n";
$handle = fopen ("php://stdin","r");
$line = fgets($handle);
echo "HashedPassword:\n" . hash("sha512", trim($line)) . "\n";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment