Created
November 5, 2020 07:34
-
-
Save amacal/411ef38fd314f46d32ddab418b3f95e1 to your computer and use it in GitHub Desktop.
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
if [ ! -f "$1" ]; then | |
exit 1 | |
fi | |
SHA=`cat $1 | openssl dgst -binary -sha256 | openssl base64` | |
BIN=`cat $1 | openssl dgst -sha256 | awk '{print $2}'` | |
echo "{ \"filebase64sha256\": \"$SHA\", \"binary\": \"$BIN\", \"status\": \"success\" }" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment