Skip to content

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

Merged
nodejs-github-bot merged 2 commits into
nodejs:mainfrom
styfle:styfle/docs-crypto
Jul 21, 2026
Merged

doc: mention crypto.hash() for better perf#63420
nodejs-github-bot merged 2 commits into
nodejs:mainfrom
styfle:styfle/docs-crypto

Conversation

@styfle

@styfle styfle commented May 19, 2026

Copy link
Copy Markdown
Member

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

@joyeecheung joyeecheung left a comment

Copy link
Copy Markdown
Member

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

@joyeecheung joyeecheung left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks

@trivikr trivikr added commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. commit-queue Add this label to land a pull request using GitHub Actions. labels Jul 21, 2026
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jul 21, 2026
@nodejs-github-bot
nodejs-github-bot merged commit f3ecafa into nodejs:main Jul 21, 2026
23 checks passed
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in f3ecafa

@styfle
styfle deleted the styfle/docs-crypto branch July 21, 2026 14:22
aduh95 pushed a commit that referenced this pull request Jul 21, 2026
Signed-off-by: Steven <steven@ceriously.com>
PR-URL: #63420
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
aduh95 pushed a commit that referenced this pull request Jul 21, 2026
Signed-off-by: Steven <steven@ceriously.com>
PR-URL: #63420
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. 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.

5 participants