marc136 / node-folder-hash

Create a hash checksum over a folder or a file
MIT License
110 stars 17 forks source link

Support algo options #217

Open EyePulp opened 11 months ago

EyePulp commented 11 months ago

Howdy; I needed to adjust an algo via extra options, so I added support via an algoOptions object to pass through for the second argument -- crypto.createHash(algorithm[, options])

Added a test and updated readme docs, bumped the package.json version.

Let me know if I can improve anything!

Thanks for a cool package.

EyePulp commented 11 months ago

Looks like Node 10 allows the options to be passed (for shake256 for example) but ignores them. I added explicit CI tests for node12, and 14, which all seem to pass. The support for algorithm args wasn't added to createHash until node v12.8

I added a fix for the versions < v12.8