-
Notifications
You must be signed in to change notification settings - Fork 64
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
Error: Invalid salt #9
Comments
Sorry this is a non-issue, just needed to swap the order of parameters of check_password_hash. Stupid me. |
Hi, You may need to encode the candidate password, i.e. the password to be checked, before running check_password_hash if you're using unicode. Here's an example: https://github.com/maxcountryman/flask-bcrypt/blob/master/test_bcrypt.py#L40 Basically what you want to do is Hope that helps! |
Okay, good to know. 🍰 |
I'm using this extension for simple password encryption and matching. I use
generate_password_hash
and save the encrypted password in the database when creating a new user.When trying to login this user,
check_password_hash(password, db_user_password)
throws anInvalid salt
exception. I don't know how to debug this. Any help?Could there be an encoding issue somewhere? I don't know a thing about encryption except generating and matching hashes, help would be appreciated.
The text was updated successfully, but these errors were encountered: