diff --git a/doc/api/crypto.md b/doc/api/crypto.md index f727d6ff57c4e2..13eccfaf291d5a 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: