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

Use bcrypt's built-in function for checking the password hash #92

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

Conversation

bliepp
Copy link

@bliepp bliepp commented Nov 22, 2023

Right now the method check_password_hash uses hmac.compare_digest(bcrypt.hashpw(password, pw_hash), pw_hash) to check if the password matches the provided hash. This is exactly how the bcrypt module implements its checkpw function. For the sake of reducing code duplication this should be replaced with bcrypt's provided function.

@bliepp bliepp changed the title Replace password checking method with bcrypt's built-in function Use bcrypt's built-in function for checking the password hash Nov 22, 2023
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.

1 participant