workerd icon indicating copy to clipboard operation
workerd copied to clipboard

feature request: crypto.hash node.js API

Open Cherry opened this issue 1 year ago • 1 comments
trafficstars

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: https://github.com/nodejs/node/pull/51044

Cherry avatar Mar 07 '24 21:03 Cherry

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

jasnell avatar Mar 08 '24 03:03 jasnell