6
4
In order to calculate the SHA1 checksum of a downloaded file, I could type
/usr/bin/openssl sha1
in Terminal and then drag there the file which I want check. To make it simpler, one could enable a Context Menu item for this action.
What is the best way to create such item in Mac OS X 10.6? A detailed answer is appreciated, because I don't have good experience with AppleScript, etc.
Step by step
- Open Automator
- Create new service
- Choose to receive selected Files and Folders in Finder
- Add action Run Shell Script where your bash command is
/usr/bin/openssl sha1 "$@"
and you pass input as arguments
How can I get the output? Preferably in a Growl pop-up or a message window/dialog.
I'm including the SHA-256 by adding
echo -n "SHA256: "
\nshasum -a 256 "$(basename "$file")" | egrep -o [a-f0-9]{64}
– henry – 2017-05-16T15:54:24.333