-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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 <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]>
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 <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
Clarify return values for crypto.publicEncrypt and similar functions PR-URL: nodejs/node#16229 Fixes: nodejs/node#12946 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
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: