GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — doc: fix webcrypto HMAC generateKey example · nodejs/node@0702d60

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • doc/api
    • webcrypto.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/api/webcrypto.md‎

Copy file name to clipboardExpand all lines: doc/api/webcrypto.md
+4-3Lines changed: 4 additions & 3 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@ const { subtle } = require('crypto').webcrypto;
1414
(async function() {
1515

1616
const key = await subtle.generateKey({
17-
name: 'hmac',
18-
length: 123
17+
name: 'HMAC',
18+
hash: 'SHA-256',
19+
length: 256
1920
}, true, ['sign', 'verify']);
2021

2122
const digest = await subtle.sign({
22-
name: 'hmac'
23+
name: 'HMAC'
2324
}, key, 'I love cupcakes');
2425

2526
})();

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.