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

Add bcrypt password hashing utility functions #356

Merged
merged 1 commit into from
Jan 26, 2025
Merged

Conversation

huiyifyj
Copy link
Collaborator

  • Update golang.org/x/crypto dependency from indirect to direct.
  • Add Generate function to generate password hash using bcrypt algorithm.
  • Add Vaildate function to vaildate password against stored hash.
  • Set default bcrypt cost parameter to 10, refer to bcrypt/bcrypt.go#DefaultCost.

- Update `golang.org/x/crypto` dependency from indirect to direct.
- Add `Generate` function to generate password hash using bcrypt algorithm.
- Add `Vaildate` function to vaildate password against stored hash.
- Set default bcrypt cost parameter to 10, refer to https://github.com/golang/crypto/blob/8929309228b460566ebf06dc56684799f352b0b0/bcrypt/bcrypt.go#L24
@huiyifyj huiyifyj added dependencies 📦 Pull requests that update a dependency file feature 💡 Add a feature or special function labels Jan 24, 2025
@huiyifyj huiyifyj added this to the 0.0.3 milestone Jan 24, 2025
@huiyifyj huiyifyj self-assigned this Jan 24, 2025
@huiyifyj huiyifyj merged commit 1db620a into main Jan 26, 2025
6 checks passed
@huiyifyj huiyifyj deleted the bcrypt-password branch January 26, 2025 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies 📦 Pull requests that update a dependency file feature 💡 Add a feature or special function
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant