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

Bug: Randomness is not cryptographically secure #3

Open
markstos opened this issue Jul 9, 2019 · 1 comment
Open

Bug: Randomness is not cryptographically secure #3

markstos opened this issue Jul 9, 2019 · 1 comment

Comments

@markstos
Copy link

markstos commented Jul 9, 2019

This module uses Math.random() is not really random.

A crypto secure solution would use crypto.getRandomBytes().

To fix this, the "create" function could use crypto-random-string

@markstos
Copy link
Author

markstos commented Jul 9, 2019

As an alternate solution to address this, I submitted a PR to crypto-random-string to add this character set as an option to that module: sindresorhus/crypto-random-string#14

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

1 participant