()
| 1 | import base64 |
| 2 | |
| 3 | def main(): |
| 4 | inp = input('->') |
| 5 | encoded = inp.encode('utf-8') #encoded the input (we need a bytes like object) |
| 6 | b32encoded = base64.b32encode(encoded) #b32encoded the encoded string |
| 7 | print(b32encoded) |
| 8 | print(base64.b32decode(b32encoded).decode('utf-8'))#decoded it |
| 9 | |
| 10 | if __name__ == '__main__': |
| 11 | main() |