Created
February 13, 2018 14:11
-
-
Save lusentis/c57118dd00345757b6123d8f91cfd208 to your computer and use it in GitHub Desktop.
bash alias definition for easy computation of SRI hashes :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# usage: | |
# $ curl https://cdn.ravenjs.com/3.22.3/raven.min.js | sri | |
alias sri='openssl dgst -sha384 -binary | openssl base64 -A | cat <(echo -n "sha384-") - | xsel -bi && echo "SRI hash copied to clipboard :)"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment