(block: Uint8Array)
| 558 | const padding = (size: number): number => (BLOCK - (size % BLOCK)) % BLOCK |
| 559 | |
| 560 | const isZeroBlock = (block: Uint8Array): boolean => { |
| 561 | for (let i = 0; i < BLOCK; i++) { |
| 562 | if (block[i] !== 0) return false |
| 563 | } |
| 564 | return true |
| 565 | } |
| 566 | |
| 567 | const sumBlock = (block: Uint8Array): number => { |
| 568 | // Four sums let the loop run faster than one |