Skip to content

Commit

Permalink
Update to use generate key pair alias
Browse files Browse the repository at this point in the history
  • Loading branch information
nealfennimore committed Jul 5, 2023
1 parent a9b1ce6 commit 9198267
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Many more examples in the [Documentation](https://neal.codes/webcrypto-ts/).

```ts
import * as ECDSA from "@nfen/webcrypto-ts/lib/ec/ecdsa";
const keyPair = await ECDSA.generateKey();
const keyPair = await ECDSA.generateKeyPair();

const message = new TextEncoder().encode("a message");
const signature = await keyPair.privateKey.sign({ hash: "SHA-512" }, message);
Expand Down Expand Up @@ -52,7 +52,7 @@ import * as RSA_OAEP from "@nfen/webcrypto-ts/lib/rsa/rsa_oaep";
import * as AES_CBC from "@nfen/webcrypto-ts/lib/aes/aes_cbc";
import * as Random from "@nfen/webcrypto-ts/lib/random";

const kek = await RSA_OAEP.generateKey(
const kek = await RSA_OAEP.generateKeyPair(
{
hash: "SHA-512",
modulusLength: 4096,
Expand Down

0 comments on commit 9198267

Please sign in to comment.