GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Basic-Programs-Python/Programs/python_encryption.py at master · ammode/Basic-Programs-Python Expand file tree/ Copy pathpython_encryption.pyMore file actions 40 lines (38 loc) · 1.25 KB / Copy pathpython_encryption.pyFile metadata and controls40 lines (38 loc) · 1.25 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 import base64 print("Python Base64 Program") print("===== Choose tools ======") print("1. Base64 ") print("2. Base16 ") print("3. Coming soon .... ") print("=========================") userInput = input("Choose number: ") if(userInput == "1"): print("==================") print("1. Encode") print("2. Decode") print("==================") userInput = input("Choose number: ") if(userInput == "1"): text = input("Input text you want to encode: ") b64text = base64.b64encode(text.encode("utf-8")) b64text = str(b64text, "utf-8") print("Encoded text: " + b64text) if(userInput == "2"): text = input("Input base64 you want to decode: ") plain = base64.b64decode(text) print("Decoded text: "+ str(plain, "utf-8")) elif(userInput == "2"): print("==================") print("1. Encode") print("2. Decode") print("==================") userInput = input("Choose number: ") if(userInput == "1"): text = input("Input text you want to encode: ") b16text = base64.b16encode(text.encode("utf-8")) b16text = str(b16text, "utf-8") print("Encoded text: " + b16text) if(userInput == "2"): text = input("Input base16 you want to decode: ") plain = base64.b16decode(text) print("Decoded text: "+ str(plain, "utf-8")) |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |