(s)
| 47 | |
| 48 | |
| 49 | def base64_to_int(s): |
| 50 | data = urlsafe_b64decode(to_bytes(s, charset="ascii")) |
| 51 | buf = struct.unpack(f"{len(data)}B", data) |
| 52 | return int("".join([f"{byte:02x}" for byte in buf]), 16) |
| 53 | |
| 54 | |
| 55 | def int_to_base64(num): |
searching dependent graphs…