Skip to content

Instantly share code, notes, and snippets.

@franciscopessoa
Created September 22, 2020 20:22
Show Gist options
  • Save franciscopessoa/f84a62046bc23b41e9c4e3063dd0526e to your computer and use it in GitHub Desktop.
Save franciscopessoa/f84a62046bc23b41e9c4e3063dd0526e to your computer and use it in GitHub Desktop.
bcrypt.php
$hash = password_hash("teste", PASSWORD_DEFAULT);
$hash = '$2y$10$5JRstzQuO6kd8xeb4fcsyutF7mWwbWw1kX3SpmwcClLfRGp6Y.V2G';
if (password_verify('teste', $hash)) {
echo 'Password is valid!';
} else {
echo 'Invalid password.';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment