Created
November 18, 2015 22:03
-
-
Save anjackson/f60e62ed69fee8f84f7f to your computer and use it in GitHub Desktop.
Calculate the Base32-encoded SHA-1 digest of a file at the command line.
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
openssl dgst -sha1 -binary $1 | python -c "import base64,sys; print base64.b32encode(sys.stdin.read())" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For Python 3, this works: