From 633c92eae865e957121e08de634aeee11a8b3992 Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Mon, 24 Apr 2023 14:03:36 +0200 Subject: Updated 18 files, added 1692 files and deleted includes/system/compare.inc (automated) --- .../external/matrix/node_modules/uuid/dist/esm-node/rng.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 includes/external/matrix/node_modules/uuid/dist/esm-node/rng.js (limited to 'includes/external/matrix/node_modules/uuid/dist/esm-node/rng.js') diff --git a/includes/external/matrix/node_modules/uuid/dist/esm-node/rng.js b/includes/external/matrix/node_modules/uuid/dist/esm-node/rng.js new file mode 100644 index 0000000..8006244 --- /dev/null +++ b/includes/external/matrix/node_modules/uuid/dist/esm-node/rng.js @@ -0,0 +1,12 @@ +import crypto from 'crypto'; +const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate + +let poolPtr = rnds8Pool.length; +export default function rng() { + if (poolPtr > rnds8Pool.length - 16) { + crypto.randomFillSync(rnds8Pool); + poolPtr = 0; + } + + return rnds8Pool.slice(poolPtr, poolPtr += 16); +} \ No newline at end of file -- cgit