This file contains hidden or 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
#!/usr/bin/python3 | |
import uuid | |
import base64 | |
import sys | |
def base32decode(s): | |
# NB - input should be a hex string of 26 characters | |
padded_bytes = f"{s}======".encode('ascii') | |
decoded_bytes = base64.b32decode(padded_bytes, casefold=True) | |
# NB - bytes_le uses .NET Guid-compatible byte order |
OlderNewer