GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — crypto: support outputLength option in crypto.hash for XOF functions by Aditi-1400 · Pull Request #58121 · nodejs/node

Conversation

@Aditi-1400

@Aditi-1400 Aditi-1400 commented May 2, 2025

Copy link
Copy Markdown
Contributor

Support outputLength option in crypto.hash() for XOF hash functions to align with the behaviour of crypto.createHash() API

Fixes: #57312

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bricss reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@nodejs-github-bot

nodejs-github-bot commented May 2, 2025

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/crypto
  • @nodejs/security-wg
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot added lib / src Issues and PRs involving general changes in the lib/ or src/ directories. needs-ci PRs that need a full CI run. labels May 2, 2025
@panva
panva requested review from joyeecheung and tniessen May 2, 2025 14:26
@panva panva added the crypto Issues and PRs related to the crypto subsystem. label May 2, 2025
joyeecheung
joyeecheung reviewed May 2, 2025
View reviewed changes
Comment thread deps/ncrypto/ncrypto.cc Resolved

Uh oh!

There was an error while loading. Please reload this page.

panva
panva reviewed May 2, 2025
View reviewed changes

@panva panva left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

@Aditi-1400 please change the PR title and commit message to crypto: support outputLength in crypto.hash for XOF functions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Aditi-1400 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@Aditi-1400 Aditi-1400 changed the title src: support outputLength in XOF hash functions crypto: support outputLength in XOF hash functions May 2, 2025
@codecov

codecov Bot commented May 2, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 82.85714% with 12 lines in your changes missing coverage. Please review.

Project coverage is 90.08%. Comparing base (f5da8f8) to head (a27fe2b).
Report is 68 commits behind head on main.

Files with missing lines Patch % Lines
src/crypto/crypto_hash.cc 73.33% 9 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #58121      +/-   ##
==========================================
- Coverage   90.08%   90.08%   -0.01%     
==========================================
  Files         640      640              
  Lines      188517   188569      +52     
  Branches    36975    36995      +20     
==========================================
+ Hits       169826   169868      +42     
- Misses      11402    11418      +16     
+ Partials     7289     7283       -6     
Files with missing lines Coverage Δ
lib/internal/crypto/hash.js 98.53% <100.00%> (+0.09%) ⬆️
src/crypto/crypto_hash.cc 70.35% <73.33%> (-0.21%) ⬇️

... and 29 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

jasnell
jasnell reviewed May 6, 2025
View reviewed changes
Comment thread deps/ncrypto/ncrypto.cc
DataPointer xofHashDigest(const Buffer<const unsigned char>& buf,
const EVP_MD* md,
size_t output_length) {
if (md == nullptr) return {};

@jasnell jasnell May 6, 2025

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

@codebytere ... can I ask you to take a look at this from a Whether-This-Will-Work-In-BoringSSL perspective?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
jasnell
jasnell reviewed May 6, 2025
View reviewed changes
Comment thread deps/ncrypto/ncrypto.cc Resolved

Uh oh!

There was an error while loading. Please reload this page.

jasnell
jasnell reviewed May 6, 2025
View reviewed changes
Comment thread deps/ncrypto/ncrypto.h Resolved

Uh oh!

There was an error while loading. Please reload this page.

jasnell
jasnell reviewed May 6, 2025
View reviewed changes
Comment thread doc/api/crypto.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

@Aditi-1400
Aditi-1400 force-pushed the crypto-hash branch from d0594f4 to aeab00b Compare May 12, 2025 17:12
@Aditi-1400
Aditi-1400 force-pushed the crypto-hash branch from aeab00b to f40c837 Compare May 27, 2025 12:50
joyeecheung
joyeecheung reviewed May 28, 2025
View reviewed changes
Comment thread src/crypto/crypto_hash.cc Resolved

Uh oh!

There was an error while loading. Please reload this page.

@Aditi-1400
Aditi-1400 force-pushed the crypto-hash branch from f40c837 to b9379c5 Compare May 28, 2025 21:07
@panva panva mentioned this pull request Jul 3, 2025
crypto: fix SHAKE128/256 breaking change introduced with OpenSSL 3.4 #58942
Merged
joyeecheung
joyeecheung approved these changes Jul 3, 2025
View reviewed changes
Comment thread doc/api/crypto.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

@Aditi-1400
Aditi-1400 force-pushed the crypto-hash branch from b9379c5 to c44c09e Compare July 3, 2025 12:37
joyeecheung
joyeecheung reviewed Jul 3, 2025
View reviewed changes
Comment thread deps/ncrypto/ncrypto.cc Resolved

Uh oh!

There was an error while loading. Please reload this page.

panva added a commit to panva/node that referenced this pull request Jul 3, 2025
@panva
crypto: fix SHAKE128/256 breaking change introduced with OpenSSL 3.4
d870b4f
Reverts: nodejs#56160
Fixes: nodejs#56159
Fixes: nodejs#58913
Refs: nodejs#58121
@Aditi-1400
Aditi-1400 force-pushed the crypto-hash branch 3 times, most recently from beb4f68 to 068c2ce Compare July 3, 2025 17:26
@joyeecheung

joyeecheung commented Jul 8, 2025

Copy link
Copy Markdown
Member

Needs a new CI after the push

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@panva panva removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Jul 8, 2025
@panva

panva commented Jul 8, 2025

Copy link
Copy Markdown
Member

@joyeecheung CI has ran with the latest push.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@panva panva added the commit-queue PRs queued for automated landing through the Commit Queue. label Jul 8, 2025
@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Jul 8, 2025
@nodejs-github-bot
nodejs-github-bot merged commit 1c4fe6d into nodejs:main Jul 8, 2025
@nodejs-github-bot

nodejs-github-bot commented Jul 8, 2025

Copy link
Copy Markdown
Collaborator

Landed in 1c4fe6d

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

RafaelGSS pushed a commit that referenced this pull request Jul 8, 2025
@panva @RafaelGSS
crypto: fix SHAKE128/256 breaking change introduced with OpenSSL 3.4
77712ae
Reverts: #56160
Fixes: #56159
Fixes: #58913
Refs: #58121
PR-URL: #58942
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
RafaelGSS pushed a commit that referenced this pull request Jul 8, 2025
@Aditi-1400 @panva @RafaelGSS
crypto: support outputLength option in crypto.hash for XOF functions
22b60e8
Support `outputLength` option in crypto.hash() for XOF hash
functions to align with the behaviour of crypto.createHash()
API

closes: #57312

Co-authored-by: Filip Skokan <[email protected]>
PR-URL: #58121
Fixes: #57312
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
@github-actions github-actions Bot mentioned this pull request Jul 8, 2025
2025-07-09, Version 24.4.0 (Current) #58993
Merged
nodejs-github-bot added a commit that referenced this pull request Jul 8, 2025
@nodejs-github-bot
2025-07-09, Version 24.4.0 (Current)
5576dec
Notable changes:

crypto:
  * (SEMVER-MINOR) support outputLength option in crypto.hash for XOF functions (Aditi) #58121
doc:
  * (SEMVER-MINOR) add all watch-mode related flags to node.1 (Dario Piotrowicz) #58719
fs:
  * (SEMVER-MINOR) add disposable mkdtempSync (Kevin Gibbons) #58516
permission:
  * (SEMVER-MINOR) propagate permission model flags on spawn (Rafael Gonzaga) #58853
sqlite:
  * (SEMVER-MINOR) add support for readBigInts option in db connection level (Miguel Marcondes Filho) #58697
src,permission:
  * (SEMVER-MINOR) add support to permission.has(addon) (Rafael Gonzaga) #58951
watch:
  * (SEMVER-MINOR) add `--watch-kill-signal` flag (Dario Piotrowicz) #58719

PR-URL: #58993
RafaelGSS pushed a commit that referenced this pull request Jul 9, 2025
@nodejs-github-bot @RafaelGSS
2025-07-09, Version 24.4.0 (Current)
c4169cb
Notable changes:

crypto:
  * (SEMVER-MINOR) support outputLength option in crypto.hash for XOF functions (Aditi) #58121
doc:
  * (SEMVER-MINOR) add all watch-mode related flags to node.1 (Dario Piotrowicz) #58719
fs:
  * (SEMVER-MINOR) add disposable mkdtempSync (Kevin Gibbons) #58516
permission:
  * (SEMVER-MINOR) propagate permission model flags on spawn (Rafael Gonzaga) #58853
sqlite:
  * (SEMVER-MINOR) add support for readBigInts option in db connection level (Miguel Marcondes Filho) #58697
src,permission:
  * (SEMVER-MINOR) add support to permission.has(addon) (Rafael Gonzaga) #58951
watch:
  * (SEMVER-MINOR) add `--watch-kill-signal` flag (Dario Piotrowicz) #58719

PR-URL: #58993
@Renegade334 Renegade334 mentioned this pull request Jul 14, 2025
Node 24.4.0 OOMs with pnpm #59057
Closed
aduh95 pushed a commit to panva/node that referenced this pull request Jul 21, 2025
@panva @aduh95
crypto: fix SHAKE128/256 breaking change introduced with OpenSSL 3.4
6699c75
Reverts: nodejs#56160
Fixes: nodejs#56159
Fixes: nodejs#58913
Refs: nodejs#58121
PR-URL: nodejs#58942
Backport-PR-URL: nodejs#58960
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
@aduh95 aduh95 added the backport-requested-v22.x PRs awaiting manual backport to the v22.x-staging branch. label Jul 21, 2025
@aduh95

aduh95 commented Jul 21, 2025

Copy link
Copy Markdown
Contributor

This doesn't land cleanly on v22.x-staging

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

marco-ippolito pushed a commit that referenced this pull request Aug 14, 2025
@panva @marco-ippolito
crypto: fix SHAKE128/256 breaking change introduced with OpenSSL 3.4
89366ab
Reverts: #56160
Fixes: #56159
Fixes: #58913
Refs: #58121
PR-URL: #58942
Backport-PR-URL: #58961
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
marco-ippolito pushed a commit that referenced this pull request Aug 25, 2025
@panva @marco-ippolito
crypto: fix SHAKE128/256 breaking change introduced with OpenSSL 3.4
fa6b798
Reverts: #56160
Fixes: #56159
Fixes: #58913
Refs: #58121
PR-URL: #58942
Backport-PR-URL: #58961
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
marco-ippolito pushed a commit that referenced this pull request Aug 27, 2025
@panva @marco-ippolito
crypto: fix SHAKE128/256 breaking change introduced with OpenSSL 3.4
090c2a6
Reverts: #56160
Fixes: #56159
Fixes: #58913
Refs: #58121
PR-URL: #58942
Backport-PR-URL: #58961
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
marco-ippolito pushed a commit that referenced this pull request Aug 27, 2025
@panva @marco-ippolito
crypto: fix SHAKE128/256 breaking change introduced with OpenSSL 3.4
068c439
Reverts: #56160
Fixes: #56159
Fixes: #58913
Refs: #58121
PR-URL: #58942
Backport-PR-URL: #58961
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
npaun pushed a commit to npaun/ncrypto that referenced this pull request Sep 18, 2025
@Aditi-1400 @panva @npaun
crypto: support outputLength option in crypto.hash for XOF functions
443b35c
Support `outputLength` option in crypto.hash() for XOF hash
functions to align with the behaviour of crypto.createHash()
API

closes: nodejs/node#57312

Co-authored-by: Filip Skokan <[email protected]>
PR-URL: nodejs/node#58121
Fixes: nodejs/node#57312
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
npaun pushed a commit to npaun/ncrypto that referenced this pull request Sep 18, 2025
@Aditi-1400 @panva @npaun
crypto: support outputLength option in crypto.hash for XOF functions
462fa63
Support `outputLength` option in crypto.hash() for XOF hash
functions to align with the behaviour of crypto.createHash()
API

closes: nodejs/node#57312

Co-authored-by: Filip Skokan <[email protected]>
PR-URL: nodejs/node#58121
Fixes: nodejs/node#57312
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
@richardlau richardlau mentioned this pull request Sep 19, 2025
crypto: avoid copying buffers to UTF-8 strings in crypto.hash() #59067
Closed
@Aditi-1400

Aditi-1400 commented Sep 24, 2025

Copy link
Copy Markdown
Contributor Author

This pull request at least depends on #56653, #57300 and #54028

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

npaun pushed a commit to npaun/ncrypto that referenced this pull request Sep 25, 2025
@Aditi-1400 @panva @npaun
crypto: support outputLength option in crypto.hash for XOF functions
6ba4577
Support `outputLength` option in crypto.hash() for XOF hash
functions to align with the behaviour of crypto.createHash()
API

closes: nodejs/node#57312

Co-authored-by: Filip Skokan <[email protected]>
PR-URL: nodejs/node#58121
Fixes: nodejs/node#57312
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
npaun pushed a commit to npaun/ncrypto that referenced this pull request Sep 25, 2025
@Aditi-1400 @panva @npaun
crypto: support outputLength option in crypto.hash for XOF functions
f562e3f
Support `outputLength` option in crypto.hash() for XOF hash
functions to align with the behaviour of crypto.createHash()
API

closes: nodejs/node#57312

Co-authored-by: Filip Skokan <[email protected]>
PR-URL: nodejs/node#58121
Fixes: nodejs/node#57312
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
npaun pushed a commit to npaun/ncrypto that referenced this pull request Sep 25, 2025
@Aditi-1400 @panva @npaun
crypto: support outputLength option in crypto.hash for XOF functions
ae4d944
Support `outputLength` option in crypto.hash() for XOF hash
functions to align with the behaviour of crypto.createHash()
API

closes: nodejs/node#57312

Co-authored-by: Filip Skokan <[email protected]>
PR-URL: nodejs/node#58121
Fixes: nodejs/node#57312
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
npaun pushed a commit to npaun/ncrypto that referenced this pull request Sep 26, 2025
@Aditi-1400 @panva @npaun
crypto: support outputLength option in crypto.hash for XOF functions
aa476b1
Support `outputLength` option in crypto.hash() for XOF hash
functions to align with the behaviour of crypto.createHash()
API

closes: nodejs/node#57312

Co-authored-by: Filip Skokan <[email protected]>
PR-URL: nodejs/node#58121
Fixes: nodejs/node#57312
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
anonrig pushed a commit to nodejs/ncrypto that referenced this pull request Sep 26, 2025
@Aditi-1400 @panva @anonrig
crypto: support outputLength option in crypto.hash for XOF functions
7690da9
Support `outputLength` option in crypto.hash() for XOF hash
functions to align with the behaviour of crypto.createHash()
API

closes: nodejs/node#57312

Co-authored-by: Filip Skokan <[email protected]>
PR-URL: nodejs/node#58121
Fixes: nodejs/node#57312
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
@robobun robobun mentioned this pull request Oct 29, 2026
node:crypto: accept the options object in crypto.hash(), decoded by Bun.CryptoHasher.hash oven-sh/bun#34926
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@joyeecheung joyeecheung joyeecheung approved these changes
@panva panva panva approved these changes
@RafaelGSS RafaelGSS RafaelGSS approved these changes
@tniessen tniessen Awaiting requested review from tniessen
@jasnell jasnell Awaiting requested review from jasnell

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

backport-requested-v22.x PRs awaiting manual backport to the v22.x-staging branch. commit-queue-squash PRs the Commit Queue should land as one squashed commit. crypto Issues and PRs related to the crypto subsystem. lib / src Issues and PRs involving general changes in the lib/ or src/ directories. needs-ci PRs that need a full CI run. review wanted PRs that need review. semver-minor PRs that contain new features and should be released in the next minor version.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

crypto.hash XOF hash functions outputLength option

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@Aditi-1400 @nodejs-github-bot @panva @joyeecheung @aduh95 @jasnell @RafaelGSS
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.