(size, seed)
| 33 | |
| 34 | // Build deterministic payloads for integrity checking. |
| 35 | function buildPayload(size, seed) { |
| 36 | const buf = new Uint8Array(size); |
| 37 | for (let i = 0; i < size; i++) { |
| 38 | buf[i] = (seed + i) & 0xff; |
| 39 | } |
| 40 | return buf; |
| 41 | } |
| 42 | |
| 43 | function checksum(data) { |
| 44 | let sum = 0; |
no outgoing calls
no test coverage detected