Skip to content

Commit

Permalink
readme: add example for chash
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmillr committed Sep 7, 2023
1 parent 7befd5f commit 6bcab6c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 6bcab6c

Please sign in to comment.