Subresource Integrity (SRI) is a security feature through which the browser checks whether resources loaded by a CDN, for example, have been manipulated. To do this, the hash we provide must match the resource.
In addition to the tool above, you can generate a SRI hash in the following ways:
$data = file_get_contents("https://code.jquery.com/jquery-3.4.1.min.js");
echo base64_encode(hash("sha256", $data, true));
cat FILENAME.js | openssl dgst -sha384 -binary | openssl base64 -A
Chrome 45+, Firefox 43+, Edge 17+, Safari 11+, Opera 32+
Share this tool with friends and colleagues on your favorite social network: