Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e1fd6ae

Browse filesBrowse files
himself65MylesBorins
authored andcommitted
doc: fix a code example in crypto.md
PR-URL: #31313 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 499c41d commit e1fd6ae
Copy full SHA for e1fd6ae

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Collapse file

‎doc/api/crypto.md‎

Copy file name to clipboardExpand all lines: doc/api/crypto.md
+2-2Lines changed: 2 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1364,8 +1364,8 @@ const signature = sign.sign(privateKey, 'hex');
13641364
const verify = crypto.createVerify('SHA256');
13651365
verify.write('some data to sign');
13661366
verify.end();
1367-
console.log(verify.verify(publicKey, signature));
1368-
// Prints: true or false
1367+
console.log(verify.verify(publicKey, signature, 'hex'));
1368+
// Prints: true
13691369
```
13701370

13711371
Example: Using the [`sign.update()`][] and [`verify.update()`][] methods:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.