crypto-utils / keygrip

Key signing and verification for rotated credentials
MIT License
931 stars 49 forks source link

Feature request: Use crypto.hash when it's available #41

Closed sandinmyjoints closed 1 week ago

sandinmyjoints commented 1 week ago

https://nodejs.org/docs/latest-v20.x/api/crypto.html#cryptohashalgorithm-data-outputencoding

It can be faster than the object-based crypto.createHash() when hashing a smaller amount of data (<= 5MB) that's readily available

sandinmyjoints commented 1 week ago

Oops, jumped the gun -- no ability to do HMAC with crypto.hash.