(algorithm, data)
| 28 | } |
| 29 | |
| 30 | const digest: EffectCrypto.Crypto["digest"] = (algorithm, data) => |
| 31 | Effect.try({ |
| 32 | try: () => Uint8Array.from(NodeCrypto.createHash(toHashAlgorithm(algorithm)).update(data).digest()), |
| 33 | catch: (cause) => |
| 34 | PlatformError.systemError({ |
| 35 | module: "Crypto", |
| 36 | method: "digest", |
| 37 | _tag: "Unknown", |
| 38 | description: "Could not compute digest", |
| 39 | cause |
| 40 | }) |
| 41 | }) |
| 42 | |
| 43 | /** |
| 44 | * The default Node.js Crypto service implementation. |
nothing calls this directly
no test coverage detected
searching dependent graphs…