Open benjamin-bergia opened 7 years ago
I have a patch which checks for erlang version at https://github.com/lafka/erlang-bcrypt/tree/lafka-erlang19-rand-bytes if interesting
Merged into https://github.com/erlangpack/bcrypt and published to Hex.pm as bcrypt 1.0.0.
crypto:rand_bytes/1
has been deprecated in newer versions of erlang. This PR replace the calls tocrypto:rand_bytes/1
withcrypto: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 oncrypto:rand_bytes/1
.Also from the doc,
crypto:strong_rand_bytes/1
can throw alow_entropy
exception. I have far from an expert in this field, so if you have any comment or recommendation, please let me know.