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

Use crypto:strong_rand_bytes/1 instead of crypto:rand_bytes/1 #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Use crypto:strong_rand_bytes/1 instead of crypto:rand_bytes/1 #19

wants to merge 1 commit into from

Conversation

benjamin-bergia
Copy link

crypto:rand_bytes/1 has been deprecated in newer versions of erlang. This PR replace the calls to crypto:rand_bytes/1 with crypto:strong_rand_bytes/1.

This will probably break the compatibility with older versions of Erlang. If needed I can update this PR to favor crypto:strong_rand_bytes/1 and, if not available, fallback on crypto:rand_bytes/1.

Also from the doc, crypto:strong_rand_bytes/1 can throw a low_entropy exception. I have far from an expert in this field, so if you have any comment or recommendation, please let me know.

@lafka
Copy link

lafka commented Apr 27, 2017

I have a patch which checks for erlang version at https://github.com/lafka/erlang-bcrypt/tree/lafka-erlang19-rand-bytes if interesting

@ddeboer
Copy link

ddeboer commented Jun 28, 2017

Merged into https://github.com/erlangpack/bcrypt and published to Hex.pm as bcrypt 1.0.0.

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

Successfully merging this pull request may close these issues.

3 participants