def _b32_decode(v):
assert v.startswith("u_"), "{0} didn't start with 'u_'".format(v)
v = v[2:]
assert len(v) == 26, "u_{0} is the wrong length".format(v)
# append padding and uppercase so that b32decode will work
v = v.upper() + (6 * "=")
return str(uuid.UUID(bytes=base64.b32decode(v)))
评论列表
文章目录