Comparing version 4.0.0-rc4 to 4.0.0-rc5
@@ -15,3 +15,11 @@ 'use strict'; | ||
if (typeof window !== 'undefined') { | ||
randomBytes = size => window.crypto.getRandomValues(new Uint8Array(size)); | ||
if (window.crypto && window.crypto.getRandomValues) { | ||
randomBytes = size => window.crypto.getRandomValues(new Uint8Array(size)); | ||
} else { | ||
randomBytes = size => { | ||
const result = new Uint8Array(size); | ||
for (let i = 0; i < size; ++i) result[i] = Math.floor(Math.random() * 256); | ||
return result; | ||
}; | ||
} | ||
} else { | ||
@@ -18,0 +26,0 @@ randomBytes = require('crypto').randomBytes; |
@@ -14,3 +14,3 @@ { | ||
], | ||
"version": "4.0.0-rc4", | ||
"version": "4.0.0-rc5", | ||
"author": "Christian Amor Kvalheim <christkv@gmail.com>", | ||
@@ -17,0 +17,0 @@ "license": "Apache-2.0", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
917762
23848