I have a few <script src="">
tags in my script. For all the js files that are in the internal file system, I'm using the command like-
cat jquery.js | openssl dgst -sha384 -binary | openssl base64 -A
to generate a base64-encoded sha384 hash and include that in the script tag like-
<script src="/js/jquery.js" integrity="J3vFgsKDNFSLyAxQe5jAHGNrVWc5wlIQG+hTxg57KX5ESMgxRMK1AbVWMP7kXogS"></script>
But my script also has a few js that are external like-
<script src="https://code.jquery.com/jquery-latest.js"></script>
How can I generate the hash for the external js so that I can include the intergrity attribute for those as well?