(bytes: Uint8Array)
| 91 | |
| 92 | // Convert a byte array to big-endian 32-bit words |
| 93 | function bytesToWords(bytes: Uint8Array): number[] { |
| 94 | const words: number[] = []; |
| 95 | for (let i = 0, b = 0; i < bytes.length; i++, b += 8) words[b >>> 5] |= bytes[i] << (24 - (b % 32)); |
| 96 | return words; |
| 97 | } |
| 98 | |
| 99 | // Convert big-endian 32-bit words to a byte array |
| 100 | function wordsToBytes(words: number[]) { |