We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 261d721 commit fde422eCopy full SHA for fde422e
ciphers/base64_cipher.py
@@ -0,0 +1,11 @@
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
+ b64encoded = base64.b64encode(encoded) #b64encoded the encoded string
7
+ print(b64encoded)
8
+ print(base64.b64decode(b64encoded).decode('utf-8'))#decoded it
9
10
+if __name__ == '__main__':
11
+ main()
0 commit comments