()
| 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 | b16encoded = base64.b16encode(encoded) #b16encoded the encoded string |
| 7 | print(b16encoded) |
| 8 | print(base64.b16decode(b16encoded).decode('utf-8'))#decoded it |
| 9 | |
| 10 | if __name__ == '__main__': |
| 11 | main() |