We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae54731 commit f944601Copy full SHA for f944601
index.js
@@ -52,7 +52,8 @@ function escapeFunctionBody(str) {
52
}
53
54
function generateUID() {
55
- var bytes = crypto.randomBytes(UID_LENGTH);
+ var bytes = crypto.getRandomValues(new Uint8Array(UID_LENGTH));
56
+ crypto.webcrypto.getRandomValues(bytes);
57
var result = '';
58
for(var i=0; i<UID_LENGTH; ++i) {
59
result += bytes[i].toString(16);
0 commit comments