GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Basic-Programs-Python/Programs/python_encryption.py at master · Akshu-on-github/Basic-Programs-Python

This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Expand file tree

/

python_encryption.py

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
40 lines (38 loc) · 1.25 KB
/

python_encryption.py

Copy path

File metadata and controls

40 lines (38 loc) · 1.25 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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.