Update checked-in dependencies
This commit is contained in:
parent
32c4995972
commit
ecdbfd6594
18 changed files with 153 additions and 68 deletions
11
node_modules/uuid/dist/esm-node/rng.js
generated
vendored
11
node_modules/uuid/dist/esm-node/rng.js
generated
vendored
|
|
@ -1,5 +1,12 @@
|
|||
import crypto from 'crypto';
|
||||
const rnds8 = new Uint8Array(16);
|
||||
const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate
|
||||
|
||||
let poolPtr = rnds8Pool.length;
|
||||
export default function rng() {
|
||||
return crypto.randomFillSync(rnds8);
|
||||
if (poolPtr > rnds8Pool.length - 16) {
|
||||
crypto.randomFillSync(rnds8Pool);
|
||||
poolPtr = 0;
|
||||
}
|
||||
|
||||
return rnds8Pool.slice(poolPtr, poolPtr += 16);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue