Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade hash algo to use password_hash/password_verify #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Script47
Copy link

@Script47 Script47 commented Oct 3, 2020

@ChristopherDay

Added a backward compatible way to update the hash algo from sha256 to use the preferred password_hash/password_verify methods.

  • Introduced two new methods hash_password($var) and verify_password($salt, $password, $compareTo = null) and deprecated the old encode method
  • Removed the user ID salt as password_hash handles salt generation

I've tested login and register with both passwords using the old algo and the new one but can't test forgot password locally, though, theoretically it should work as login and register do.

@Script47 Script47 changed the title Upgraded hash algo to use password_hash/password_verify Upgrade hash algo to use password_hash/password_verify Oct 3, 2020
Copy link

@T-Tron T-Tron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works - Perfect Code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants