From 6bcab6c24b4c3a2433924cc59bb8f2cd0e324233 Mon Sep 17 00:00:00 2001 From: Paul Miller Date: Thu, 7 Sep 2023 21:44:46 +0000 Subject: [PATCH] readme: add example for chash --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 2dd08ca..ae18c41 100644 --- a/README.md +++ b/README.md @@ -315,6 +315,10 @@ type CHash = { outputLen: number; create(): any; }; + +// example +function sha256(message: Uint8Array) { return _internal_lowlvl(message) } +sha256.outputLen = 32; // 32 bytes of output for sha2-256 ``` **Message hash** is expected instead of message itself: