From 224d3f40dc45fa07650640f78d82f30170ac4ea9 Mon Sep 17 00:00:00 2001 From: Filip Skokan Date: Mon, 20 Jun 2022 15:42:33 +0200 Subject: [PATCH] crypto: update Wrapping and unwrapping keys webcrypto example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/43452 Reviewed-By: Tobias Nießen Reviewed-By: Luigi Pinca --- doc/api/webcrypto.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/webcrypto.md b/doc/api/webcrypto.md index 6377bb32bfa27c..aae1270e400f96 100644 --- a/doc/api/webcrypto.md +++ b/doc/api/webcrypto.md @@ -226,7 +226,7 @@ async function generateAndWrapHmacKey(format = 'jwk', hash = 'SHA-512') { const wrappedKey = await subtle.wrapKey(format, key, wrappingKey, 'AES-KW'); - return wrappedKey; + return { wrappedKey, wrappingKey }; } async function unwrapHmacKey( @@ -238,7 +238,7 @@ async function unwrapHmacKey( const key = await subtle.unwrapKey( format, wrappedKey, - unwrappingKey, + wrappingKey, 'AES-KW', { name: 'HMAC', hash }, true,