paulmillr / noble-hashes

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

Ensure blake3 inputs are immutable #51

Closed libitx closed 1 year ago

libitx commented 1 year ago

Fixes #50

As discussed in #50, I tried to spot if this issue is anywhere else. Looking where toBytes is used doesn't really help as a) it's used all over the place, and b) it doesn't reveal if elsewhere in the code a referenced input is mutated.

Best thing is to add similar tests as I've done for every hash function. But that's a job for a rainy day ;)

paulmillr commented 1 year ago

please run npm run format

libitx commented 1 year ago

formatting is done 👍