Skip to content

doc: mention crypto.hash() for better perf#63420

Open
styfle wants to merge 2 commits into
nodejs:mainfrom
styfle:styfle/docs-crypto
Open

doc: mention crypto.hash() for better perf#63420
styfle wants to merge 2 commits into
nodejs:mainfrom
styfle:styfle/docs-crypto

Conversation

@styfle
Copy link
Copy Markdown
Member

@styfle styfle commented May 19, 2026

The docs on crypto.hash() already mentioned why you would use it over crypto.createHash().

This PR adds the reverse so that the docs on crypto.createHash() mention why you would use crypto.hash().

@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/crypto

@nodejs-github-bot nodejs-github-bot added crypto Issues and PRs related to the crypto subsystem. doc Issues and PRs related to the documentations. labels May 19, 2026
Signed-off-by: Steven <steven@ceriously.com>
@styfle styfle force-pushed the styfle/docs-crypto branch from 5759172 to 05c7389 Compare May 19, 2026 01:22
Copy link
Copy Markdown
Member

@joyeecheung joyeecheung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel that we should be less imperative in the docs for performance recommendations, it's better to just state the performance observations and users can decide for themselves considering their input shapes (it's not definitively faster if the data is not readily available).

Comment thread doc/api/crypto.md Outdated
Co-authored-by: Joyee Cheung <joyeec9h3@gmail.com>
@styfle styfle requested a review from joyeecheung May 20, 2026 15:06
Copy link
Copy Markdown
Member

@joyeecheung joyeecheung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

crypto Issues and PRs related to the crypto subsystem. doc Issues and PRs related to the documentations.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants