Skip to content

Instantly share code, notes, and snippets.

@bef
Created October 17, 2018 10:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bef/a886311554f1d28a76ea96043a157a7f to your computer and use it in GitHub Desktop.
Save bef/a886311554f1d28a76ea96043a157a7f to your computer and use it in GitHub Desktop.
#!/usr/bin/env python2
from zbase32 import zbase32
import hashlib
import sys
input = sys.argv[1]
print "hashing " + input
m = hashlib.sha1()
m.update(input)
digest = m.digest()
print zbase32.b2a(digest)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment