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

node v6.9.4 #5

Closed
retani opened this issue Aug 10, 2017 · 1 comment
Closed

node v6.9.4 #5

retani opened this issue Aug 10, 2017 · 1 comment

Comments

@retani
Copy link

retani commented Aug 10, 2017

I am getting Error: secure random number generation not supported by this browser use chrome, FireFox or Internet Explorer 11 using node v6.9.4 when initializing. However, I am not sure where this warning is issued

@sehrope
Copy link
Owner

sehrope commented Aug 10, 2017

You're trying to use this module client side, I'm guessing via browserify, in an older browser that doesn't support generation of secure random numbers.

Here's the source of the message: https://github.com/crypto-browserify/randombytes/blob/9b470ac1419e5545a5265238ccc5db8a7f1f8644/browser.js#L4

I don't think there's much of a work around here as in those older browsers there is no secure way to generate random numbers. As such there's no correct way to implement that function. You may be able to kludge a polyfill with Math.random() but it'd be horrendously insecure. Better off only supporting modern browsers that support those newer Crypto APIs.

@sehrope sehrope closed this as completed Aug 10, 2017
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

2 participants