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

log_rounds config doesn't seem to make a difference #76

Closed
pdilyard opened this issue Feb 4, 2016 · 3 comments
Closed

log_rounds config doesn't seem to make a difference #76

pdilyard opened this issue Feb 4, 2016 · 3 comments

Comments

@pdilyard
Copy link

pdilyard commented Feb 4, 2016

I've added the log_rounds config option to my test config file to speed up the tests, but no matter what value I put it doesn't seem to make a difference.

config/config.test.exs:

# Speed up our test suite
config :comeonin, :bcrypt_log_rounds, 4

I tried bumping the number up to 200 to see if it was taking effect, and the tests ran in exactly the same time. I also added the configuration to config/config.exs to be 100% sure it was being loaded, and got the same results.

@riverrun
Copy link
Owner

riverrun commented Feb 5, 2016

Try changing it to 14 or 16. That should make a big difference.
200 won't work because the maximum number of log_rounds is 31 (and the minimum is 4).
To truly verify that it's working or not, check the hashes that are produced - they should start with "$2b$" and then the next two numbers will tell you the number of log_rounds.

@pdilyard
Copy link
Author

pdilyard commented Feb 5, 2016

Yep that worked, thanks!

@pdilyard pdilyard closed this as completed Feb 5, 2016
@Preen
Copy link

Preen commented May 31, 2017

The important part is that you create a new user or change the password on the user after you've implemented the changes whenever you change this in order to see any difference.

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

3 participants