Skip to content
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.hash XOF hash functions outputLength option #57312

Open
panva opened this issue Mar 4, 2025 · 1 comment
Open

crypto.hash XOF hash functions outputLength option #57312

panva opened this issue Mar 4, 2025 · 1 comment
Labels
feature request Issues that request new features to be added to Node.js.

Comments

@panva
Copy link
Member

panva commented Mar 4, 2025

What is the problem this feature will solve?

This is follow up to #51044 (comment) (cc @tniessen @joyeecheung)

We should add the ability to define outputLength for XOF hash functions in crypto.hash so that it's on par with the crypto.createHash API

What is the feature you are proposing to solve the problem?

Being able to use e.g. shake128 and shake256 with varying output lengths using crypto.hash

What alternatives have you considered?

No response

@panva panva added the feature request Issues that request new features to be added to Node.js. label Mar 4, 2025
@github-project-automation github-project-automation bot moved this to Awaiting Triage in Node.js feature requests Mar 4, 2025
@jasnell
Copy link
Member

jasnell commented Mar 4, 2025

I'm +1 so long as there is a reasonable upper limit on the outputLength given that this is not streaming back the results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issues that request new features to be added to Node.js.
Projects
Status: Awaiting Triage
Development

No branches or pull requests

2 participants