()
| 14 | this.filledBuffer = new Uint8Array(0); |
| 15 | } |
| 16 | private fillBuffer(): void { |
| 17 | this.buffer.fill(0); |
| 18 | this.buffer = this.fillBufferDirect(this.buffer); |
| 19 | this.filledBuffer = this.buffer; |
| 20 | } |
| 21 | private fillBufferDirect(buffer: Uint8Array): Uint8Array { |
| 22 | if ((buffer.length % seedRandomBlockSize) !== 0) throw new Error(`SeedRandomWrapper.fillBufferDirect should always be called with the buffer with the length a multiple-of-${seedRandomBlockSize}!`); |
| 23 | const length = buffer.length / seedRandomBlockSize; |
no test coverage detected