-
Notifications
You must be signed in to change notification settings - Fork 66
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
Comeonin Bcrypt does not support the 2y prefix? #103
Comments
The |
Is there any other option or libraries, i can try right now? |
I don't know anything in Elixir or Erlang that supports the |
@riverrun as far as I understand, PHP people had a bug in their implementation, and used special prefix So, in a nutshell, hashes with |
The However, before I make any change, I obviously need to do a certain amount of research to decide how best to approach it. At the moment, I don't have the time to do that, but if there is a demand for I hope that answers your questions. |
I'm not sure if this should be supported to be fair. Maybe we simply need better error message saying that this prefix is not supported, and you should replace it with compatible |
I could look into improving the error message. |
For what it's worth, this works for me: Comeonin.Bcrypt.checkpw(password, fix_prefix(password_hash))
defp fix_prefix("$2y" <> rest), do: "$2b" <> rest
defp fix_prefix(password_hash), do: password_hash |
I have a set passwords which have
$2y$
prefix. When i trying to check password usingComeonin.Bcrypt.checkpw("hard to guess", stored_hash)
, I am getting error like Comeonin Bcrypt does not support the 2y prefix, how can i resolve this issueThe text was updated successfully, but these errors were encountered: