diff --git a/lib/utils.js b/lib/utils.js index 4401501d..7e7b9c19 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -319,11 +319,11 @@ class Lcg { } nextBuffer (len) { - let arr = []; + let arr = new Uint8Array(len); for (let i = 0; i < len; i++) { - arr.push(this.nextInt(256)); + arr[i] = this.nextInt(256); } - return Buffer.from(arr); + return arr; } choice (arr) {