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