(bytes: Uint8Array)
| 83 | // VirtualProvider). node:crypto is available natively on Node and |
| 84 | // polyfilled by workerd. |
| 85 | function sha256(bytes: Uint8Array): Uint8Array { |
| 86 | const hash = createHash("sha256"); |
| 87 | hash.update(bytes); |
| 88 | return new Uint8Array(hash.digest()); |
| 89 | } |
| 90 | |
| 91 | interface PreparedChunk { |
| 92 | hash: Uint8Array; |
no test coverage detected