Skip to content

Instantly share code, notes, and snippets.

@falmar
Last active March 16, 2017 23:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save falmar/161eb98371d8640ffc39963d38a3afb9 to your computer and use it in GitHub Desktop.
Save falmar/161eb98371d8640ffc39963d38a3afb9 to your computer and use it in GitHub Desktop.
// http://php.net/manual/en/function.password-hash.php
$password = password_hash($string, PASSWORD_BCRYPT, ['cost' => 9]);
// http://php.net/manual/en/function.password-verify.php
$correct = password_verify($string, $password);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment