(bytes: Byte[], endian: Endian)
| 355 | } |
| 356 | |
| 357 | function bytesToWords32(bytes: Byte[], endian: Endian): number[] { |
| 358 | const size = (bytes.length + 3) >>> 2; |
| 359 | const words32 = []; |
| 360 | |
| 361 | for (let i = 0; i < size; i++) { |
| 362 | words32[i] = wordAt(bytes, i * 4, endian); |
| 363 | } |
| 364 | |
| 365 | return words32; |
| 366 | } |
| 367 | |
| 368 | function byteAt(bytes: Byte[], index: number): Byte { |
| 369 | return index >= bytes.length ? 0 : bytes[index]; |