diff --git a/doc/api/crypto.md b/doc/api/crypto.md index bfe0c8bc6acbfc..4562f71e0b2343 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: