MCPcopy Create free account
hub / github.com/GoogleChrome/samples / initRandomFill

Function initRandomFill

sqlite-wasm-cos/sqlite3-node.mjs:672–680  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

670};
671
672var initRandomFill = () => {
673 // This block is not needed on v19+ since crypto.getRandomValues is builtin
674 if (ENVIRONMENT_IS_NODE) {
675 var nodeCrypto = require('node:crypto');
676 return (view) => nodeCrypto.randomFillSync(view);
677 }
678
679 return (view) => crypto.getRandomValues(view);
680 };
681var randomFill = (view) => {
682 // Lazily init on the first invocation.
683 (randomFill = initRandomFill())(view);

Callers 1

randomFillFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected