Skip to content

Instantly share code, notes, and snippets.

@obfusk
Created February 6, 2024 00:04
Show Gist options
  • Save obfusk/b0f724075c0f596249f2f74c80c0ef2a to your computer and use it in GitHub Desktop.
Save obfusk/b0f724075c0f596249f2f74c80c0ef2a to your computer and use it in GitHub Desktop.
wkd encoding
import base64
import hashlib
import sys
t = str.maketrans("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567", "ybndrfg8ejkmcpqxot1uwisza345h769")
print(base64.b32encode(hashlib.sha1(sys.argv[1].encode().lower()).digest()).decode().translate(t))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment