A multi-threaded Golang SRI hash generator
SRI is a new W3C specification that allows web developers to ensure that resources hosted on third-party servers have not been tampered with. Use of SRI is recommended as a best-practice, whenever libraries are loaded from a third-party source.
At the time of writing, Chrome & Firefox.
Check out Can I Use for more information
$ sri-gen -hash(256|384|512) [file paths]
will output a result.txt file with resultant hashes ready for SRI with their respective file names
$ sri-gen -hash256 ./example.js ./example2.js
will output
File Hash
./example.js sha256-e9b3814bb4959f2749876624f0a9b04ade95f9faff092d673e00f18cd0c503c2
./example2.js sha256-a1cc3b3fe09a7aa98c6c8251d2dd7d48a2ddb9f1fec12a3040a5b66c7a6f1171