Repository navigation
Crypto docs don't explain the function signatures #12946
Description
Activity
- addeddocIssues and PRs related to Node.js documentation.Issues and PRs related to Node.js documentation.cryptoIssues and PRs related to the crypto subsystem.Issues and PRs related to the crypto subsystem.good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.
on May 10, 2017 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
doc/api/crypto.md.- removedgood first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.
on May 10, 2017 - added a commit that references this issue
on May 19, 2017 - added a commit that references this issue
on May 19, 2017 Okay, that fixes the documentation for
publicEncrypt, but it doesn't touch the documentation for the other three functions like it (and I'd expect that there are more ambiguities like this in the docs right now).Also, isn't there a formal way of documenting a function's return type?
Ah, right. Sorry, reopening.
Also, isn't there a formal way of documenting a function's return type?
I think there is, we have something like
* Returns: {integer} The number of bytes contained within `string`for that.- addedgood first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.
on May 20, 2017 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.
- added a commit that references this issue
on Oct 16, 2017 @joyeecheung I've made a PR to address this. Let me know if I missed anything
- added a commit that references this issue
on Oct 18, 2017 - added a commit that references this issue
on Jul 27, 2026
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.