Skip to content

Commit f944601

Browse files
committed
revert crypto
1 parent ae54731 commit f944601

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ function escapeFunctionBody(str) {
5252
}
5353

5454
function generateUID() {
55-
var bytes = crypto.randomBytes(UID_LENGTH);
55+
var bytes = crypto.getRandomValues(new Uint8Array(UID_LENGTH));
56+
crypto.webcrypto.getRandomValues(bytes);
5657
var result = '';
5758
for(var i=0; i<UID_LENGTH; ++i) {
5859
result += bytes[i].toString(16);

0 commit comments

Comments
 (0)