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

Check if String is same as hashed password #38

Closed
ywegel opened this issue May 23, 2022 · 3 comments
Closed

Check if String is same as hashed password #38

ywegel opened this issue May 23, 2022 · 3 comments

Comments

@ywegel
Copy link
Contributor

ywegel commented May 23, 2022

I am currently implementing a feature to change a users password and email. To do that the user has to reenter the password, even if he is logged in. After that i want to hash the password and compare it to the current one.
My Problem is:
I can't find a method to easily hash a String with the same salt as the current password. For now i can try to use the argon2 crate as you do and hash it that way, but It would be nice to have a function to compare the hashed password to a string. Maybe you can add that in the next release :)

@tvallotton
Copy link
Owner

Hi, feel free to make a PR for it. Unfortunately I have been a little busy lately, so it make take me some time before I can take a look at this.

@ywegel
Copy link
Contributor Author

ywegel commented May 23, 2022

No problem. If i have time i will try to implement it and make a PR

@ywegel
Copy link
Contributor Author

ywegel commented May 29, 2022

This was implemented in fe538aa

@ywegel ywegel closed this as completed May 29, 2022
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

No branches or pull requests

2 participants