Skip to content
Myr

Export `md5` function in src/utils/crypto.ts (#305)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* Export `md5` function in src/utils/crypto.ts Export an additional `md5` function in the crypto utility. Useful when working with R2 and providing a MD5 hash for verification. ``` import { md5 } from "hono/utils/crypto"; ... const md5Digest = md5(body); const object = await bucket.put(key, body, {md5: md5Digest}); ``` * Update crypto.test.ts Add a test for 'md5' crypto utility function. * Add forgotten import to crypto.test.ts

authored by Eric Lee · committed by GitHub · parent 6b8d605 · Browse files · 2 files+13 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+13 added−1 removed

  • tests:+7 added−1 removed
  • other:+6 added−0 removed

2 files+13 added−1 removed

modified:src/utils/crypto.test.ts+7 added-1 removed
modified:src/utils/crypto.ts+6 added