-
-
Notifications
You must be signed in to change notification settings - Fork 915
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "first pass at maintainer covenant, fix #586"
This reverts commit c285a4a.
- Loading branch information
Showing
3 changed files
with
0 additions
and
78 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,12 @@ | ||
import crypto from 'crypto'; | ||
|
||
<<<<<<< Updated upstream | ||
const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate | ||
======= | ||
const rnds8Pool = new Uint8Array(256); | ||
>>>>>>> Stashed changes | ||
let poolPtr = rnds8Pool.length; | ||
|
||
export default function rng() { | ||
if (poolPtr > rnds8Pool.length - 16) { | ||
crypto.randomFillSync(rnds8Pool); | ||
poolPtr = 0; | ||
} | ||
|
||
return rnds8Pool.slice(poolPtr, (poolPtr += 16)); | ||
} |