paulmillr / noble-hashes

Audited & minimal JS implementation of hash functions, MACs and KDFs.
https://paulmillr.com/noble
MIT License
573 stars 46 forks source link

README claims support for all stable nodejs versions, but crypto.randomValues isn't available in node14 #44

Closed brandonblack closed 1 year ago

brandonblack commented 1 year ago

Still has a month or two of support left. Probably not worth fixing :)

paulmillr commented 1 year ago

crypto.randomValues is not used in node.js, see import map located in package.json

brandonblack commented 1 year ago

https://github.com/paulmillr/noble-hashes/blob/main/src/cryptoNode.ts#L3 https://github.com/paulmillr/noble-hashes/blob/main/src/utils.ts#L200

Sure looks like it uses webcrypto.randomValues on nodejs, which doesn't exist in node14.

paulmillr commented 1 year ago

hmmmm i've somehow missed this. Wondering whether to release a new version or just wait 2023-04-30 until node 14 is eol.

paulmillr commented 1 year ago

ok, whatevs. Will wait until apr 30th. node 14 doesn't matter anymore.