-
Notifications
You must be signed in to change notification settings - Fork 894
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
Add check if crypto.getRandomValues is available #3487
Conversation
On some IE11 the randomBytes helper crashes with "TypeError: getRandomValues is not defined". The reason is not clear, maybe something pollutes self.crypto with a bad polyfill. Nevertheless it makes sense to fall back to Math.random if crypto.getRandomValues is not available.
🦋 Changeset is good to goLatest commit: 81d4de5 We got this. This PR includes changesets to release 9 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
@schmidt-sebastian Mind taking a look? :) |
Co-authored-by: Sebastian Schmidt <mrschmidt@google.com>
On some IE11 the randomBytes helper crashes with "TypeError: getRandomValues is not defined". The reason is not clear, maybe something pollutes self.crypto with a bad polyfill. Nevertheless it makes sense to fall back to Math.random if crypto.getRandomValues is not available.