From 9198267225330b90362cced44e0caafc9ea513cb Mon Sep 17 00:00:00 2001 From: Neal Fennimore Date: Wed, 5 Jul 2023 10:32:36 -0400 Subject: [PATCH] Update to use generate key pair alias --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 786d53e1..e5c13c05 100644 --- a/README.md +++ b/README.md @@ -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); @@ -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,