diff --git a/doc/api/webcrypto.md b/doc/api/webcrypto.md index c238d32fd7143c..e6ab880902d4bd 100644 --- a/doc/api/webcrypto.md +++ b/doc/api/webcrypto.md @@ -14,12 +14,13 @@ const { subtle } = require('crypto').webcrypto; (async function() { const key = await subtle.generateKey({ - name: 'hmac', - length: 123 + name: 'HMAC', + hash: 'SHA-256', + length: 256 }, true, ['sign', 'verify']); const digest = await subtle.sign({ - name: 'hmac' + name: 'HMAC' }, key, 'I love cupcakes'); })();