I just spent about an hour bashing my head against the wall because the documentation for crypto.publicEncrypt & co. don't explain that they return a new Buffer with the encrypted data instead of encrypting the passed-in Buffer in place.
Yes, in hindsight, this should have been obvious, but I don't get why these functions don't explain their return values when so much of the rest of core does.
I just spent about an hour bashing my head against the wall because the documentation for
crypto.publicEncrypt& co. don't explain that they return a newBufferwith the encrypted data instead of encrypting the passed-inBufferin place.Yes, in hindsight, this should have been obvious, but I don't get why these functions don't explain their return values when so much of the rest of core does.