diff options
author | himself65 <himself65@outlook.com> | 2020-01-11 10:07:49 +0300 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2020-01-14 08:14:59 +0300 |
commit | 44aec00b70ece0d526faba8d312755d3ca49080c (patch) | |
tree | 67f321586ca10b6b2bc16b8d1b72807e0545e288 /doc/api/crypto.md | |
parent | d15b8ea3bdcb72b8e2dd3aee0cc717daa512d2f6 (diff) |
doc: fix a code example in crypto.md
PR-URL: https://github.com/nodejs/node/pull/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>
Diffstat (limited to 'doc/api/crypto.md')
-rw-r--r-- | doc/api/crypto.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/api/crypto.md b/doc/api/crypto.md index c12b4a77f64..7d65fc78cf2 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -1364,8 +1364,8 @@ const signature = sign.sign(privateKey, 'hex'); const verify = crypto.createVerify('SHA256'); verify.write('some data to sign'); verify.end(); -console.log(verify.verify(publicKey, signature)); -// Prints: true or false +console.log(verify.verify(publicKey, signature, 'hex')); +// Prints: true ``` Example: Using the [`sign.update()`][] and [`verify.update()`][] methods: |