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

feature request: crypto.hash node.js API #1781

Open
Cherry opened this issue Mar 7, 2024 · 1 comment
Open

feature request: crypto.hash node.js API #1781

Cherry opened this issue Mar 7, 2024 · 1 comment
Labels
api feature request Request for Workers team to add a feature frameworks nodejs compat

Comments

@Cherry
Copy link
Contributor

Cherry commented Mar 7, 2024

A new API has landed in Node.js that's extremely ergonomic for one-off quick hashes:

crypto.hash('sha256', 'some-string')

instead of:

crypto.createHash('sha256').update('some-string').digest('hex')

I find myself often reaching for the Node.js crypto API over web crypto since it's much more ergonomic, and it would be great to see this addition landed in workerd in the future.

Reference: nodejs/node#51044

@jasnell
Copy link
Member

jasnell commented Mar 8, 2024

I've already got it on my list for when I continue working on the node.js compat

@jasnell jasnell added the feature request Request for Workers team to add a feature label Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api feature request Request for Workers team to add a feature frameworks nodejs compat
Projects
None yet
Development

No branches or pull requests

2 participants