There was an error while loading. Please reload this page.
1 parent 08a19a4 commit b0036edCopy full SHA for b0036ed
1 file changed
index.cjs
@@ -11,6 +11,7 @@ const POOL_SIZE_MULTIPLIER = 128
11
let pool, poolOffset
12
13
let fillPool = bytes => {
14
+ if (bytes < 0 || bytes > 1024) throw new RangeError('Wrong ID size')
15
if (!pool || pool.length < bytes) {
16
pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER)
17
crypto.randomFillSync(pool)
0 commit comments