Skip to content

Instantly share code, notes, and snippets.

@marcan2020
Last active November 16, 2021 21:29
Show Gist options
  • Save marcan2020/1ec01f1dfe905cffb935c6e46192c878 to your computer and use it in GitHub Desktop.
Save marcan2020/1ec01f1dfe905cffb935c6e46192c878 to your computer and use it in GitHub Desktop.
shc_fromNumeric.py
import re
qr_data = "shc:/5676290952432060346029243740..."
parts = re.findall('..', qr_data[5:])
jws = ""
for p in parts:
jws += chr(int(p)+ 45)
print("jws:", jws)
# jws: eyJ6aXAiOiJERUYiLCJhbGciOiJFUzI1Ni...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment