You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Return the original view to match modern native implementations.
1327
-
view
1328
-
);
1329
-
}catch(e){
1330
-
// nodejs doesn't have crypto support
1331
-
}
1332
-
}
1333
-
#endif // ENVIRONMENT_MAY_BE_NODE
1334
-
// we couldn't find a proper implementation, as Math.random() is not suitable for /dev/random, see emscripten-core/emscripten/pull/7096
1335
-
#if ASSERTIONS
1336
-
abort('no cryptographic support found for randomDevice. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: (array) => { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };');
1337
-
#else
1338
-
abort('initRandomDevice');
1339
-
#endif
1340
-
},
1341
-
1342
-
$randomFill__deps: ['$initRandomFill'],
1343
-
$randomFill: (view)=>{
1344
-
// Lazily init on the first invocation.
1345
-
return(randomFill=initRandomFill())(view);
1346
-
},
1347
-
1348
-
getentropy__deps: ['$randomFill'],
1349
-
getentropy: (buffer,size)=>{
1350
-
randomFill(HEAPU8.subarray(buffer,buffer+size));
1351
-
return0;
1352
-
},
1353
-
1354
1295
$timers: {},
1355
1296
1356
1297
// Helper function for setitimer that registers timers with the eventloop.
// Return the original view to match modern native implementations.
598
+
view
599
+
);
600
+
}catch(e){
601
+
// nodejs doesn't have crypto support
602
+
}
603
+
}
604
+
#endif // ENVIRONMENT_MAY_BE_NODE
605
+
// we couldn't find a proper implementation, as Math.random() is not suitable for /dev/random, see emscripten-core/emscripten/pull/7096
606
+
#if ASSERTIONS
607
+
abort('no cryptographic support found for randomDevice. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: (array) => { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };');
0 commit comments