-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crypto docs don't explain the function signatures #12946
Comments
Thanks for reporting this. If you or someone else wants to update the documentation and submit a pull request, the markdown file containing the relevant documentation is |
As per nodejs#12946 the crypto doc for publicEncrypt doesn't tell you whether the encryption happens in place or not.
As per nodejs#12946 the crypto doc for publicEncrypt doesn't tell you whether the encryption happens in place or not. Fixes: nodejs#12946 PR-URL: nodejs#12947 Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Okay, that fixes the documentation for Also, isn't there a formal way of documenting a function's return type? |
Ah, right. Sorry, reopening.
I think there is, we have something like |
Looks like the PR never got merged, does this still require attention? I can clean this up if help is still needed |
@jieyanhuang Please do! Our contributing guide should provide enough guidance on how to sumbit a PR. |
Clarify on the return values for crypto.publicEncrypt and similar functions Fixes: nodejs#12946
@joyeecheung I've made a PR to address this. Let me know if I missed anything |
Clarify return values for crypto.publicEncrypt and similar functions PR-URL: #16229 Fixes: #12946 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Clarify return values for crypto.publicEncrypt and similar functions PR-URL: nodejs/node#16229 Fixes: nodejs/node#12946 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
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 newBuffer
with the encrypted data instead of encrypting the passed-inBuffer
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.
The text was updated successfully, but these errors were encountered: