Skip to content

Commit

Permalink
Fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
nealfennimore committed Aug 23, 2024
1 parent 72d6c20 commit e7ab4d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ For example, we can generate an ECDSA keypair and `sign` directly off the `priva
import * as ECDSA from "@nfen/webcrypto-ts/lib/ec/ecdsa";
const keyPair = await ECDSA.generateKeyPair();
const message = new TextEncoder().encode("a message");
const signature = await keyPair.privateKey.sign({ hash: "SHA-512" });
const signature = await keyPair.privateKey.sign({ hash: "SHA-512" }, message);
```

We can still use the WebCrypto based API too. Access any CryptoKey or CryptoKeyPair by using `self` on the key.
Expand Down

0 comments on commit e7ab4d2

Please sign in to comment.