Created
October 27, 2018 09:56
-
-
Save e0en/93a6d11e5fb9941556790371f335a8e2 to your computer and use it in GitHub Desktop.
Calculate base64-encoded SHA-384 hash of a file. Useful when you need to fill "integrity" field of HTML resources.
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
# calc base64-encoded sha384 hash of a file | |
base64sha384 () { | |
openssl dgst -sha384 -binary < $1 | openssl enc -base64 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
usage: