Created
November 10, 2017 02:43
-
-
Save davidraedev/9c0b51947f730ce56491e11158270967 to your computer and use it in GitHub Desktop.
subresource integrity hash, local and remote wget or curl
This file contains 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
# local | |
echo 'sha384-'"$( cat FILENAME | openssl dgst -sha384 -binary | openssl enc -base64 -A )"; | |
# wget | |
echo 'sha384-'"$( wget -o/dev/null -O- URL_HERE | openssl dgst -sha384 -binary | openssl enc -base64 -A )"; | |
# curl | |
echo 'sha384-'"$( curl -s URL_HERE | openssl dgst -sha384 -binary | openssl enc -base64 -A )"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment