Post

That one trick your LLM doesn't know about... Instead of createHash('sha1').update(data).digest('hex') You can do hash('sha1', data, 'hex')

1 repost20 likes

It is documented and explains a bit, but not well known: > It can be faster than the object-based crypto.createHash() when hashing a smaller amount of data (<= 5MB) that's readily available. If the data can be big or if it is streamed, it's still recommended to use crypto.createHash() instead.