riverrun / bcrypt_elixir

Bcrypt password hashing for Elixir
Other
164 stars 26 forks source link

Pass legacy option through hash_pwd_salt #12

Closed sorentwo closed 6 years ago

sorentwo commented 6 years ago

Wrappers, such as Comeonin.Bcrypt.hashpwd/2 accept keyword options as the second param, but only the log_rounds value was used. That made it necessary to use functions from Bcrypt directly to generate legacy style hashes.

This patch adds support for the legacy option in Bcrypt.hash_pwd_salt/2, making it possible to generate legacy passwords with a single function.

riverrun commented 6 years ago

Great! Thanks for your help :)