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
A new API has landed in Node.js that's extremely ergonomic for one-off quick hashes:
instead of:
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