A command-line encryption and decryption tool supporting multiple BaseX encoding schemes: Base16, Base32, Base64, and Base85.
Developed in Python as an educational project for learning and demonstrating BaseX encoding techniques.
The Encryption & Decryption System is a lightweight Python-based program that allows you to securely encode and decode messages using different BaseX encoding formats.
It supports:
- Base85 — highest density text encoding
- Base64 — common web encoding
- Base32 — used in DNS and authentication keys
- Base16 — hexadecimal representation
This is an interactive terminal program, perfect for practicing encoding techniques and understanding BaseX operations.
- Choose between Base85, Base64, Base32, or Base16
- Input any UTF-8 text
- Get an encoded string instantly
- Decode Base85, Base64, Base32, or Base16 strings back to plain text
- Handles invalid inputs with error messages
- ASCII input validation for correct decoding
Encoding | Type | Purpose |
---|---|---|
Base85 | Text encoding | High-density ASCII representation |
Base64 | Text encoding | Common in email/web data transfer |
Base32 | Text encoding | Used in DNS & authentication keys |
Base16 | Hexadecimal | Low-level data representation |
Encryption_Decryption-main/
├── README.md # Project documentation
├── encode.py # Encryption script (Base85, Base64, Base32, Base16)
└── decode.py # Decryption script (Base85, Base64, Base32, Base16)
-
Install Python:
Ensure Python 3.8+ is installed:
-
Download or Clone the Project
git clone https://github.com/LowZhiHorng/Encryption_Decryption.git cd Encryption_Decryption-main
-
Run the Program
-
For encryption:
python encode.py
-
For decryption:
python decode.py
-
🔒 Encrypting a Message
$ python encode.py
Encryption System
1. Base 85 Encryption
2. Base 64 Encryption
3. Base 32 Encryption
4. Base 16 Encryption
What's your choice? (1/2/3/4): 2
Encryption message: Hello World
Encrypted message: SGVsbG8gV29ybGQ=
🔓 Decrypting a Message
$ python decode.py
Decryption System
1. Base 85 Decryption
2. Base 64 Decryption
3. Base 32 Decryption
4. Base 16 Decryption
What's your choice? (1/2/3/4): 2
Decryption message: SGVsbG8gV29ybGQ=
Decrypted message: Hello World
Module not found → Ensure you are running Python 3.8+
and have no typos in file names.
UnicodeDecodeError during decryption → Make sure you select the correct encoding type for the message.
Invalid choice → Only enter 1
, 2
, 3
, or 4
when prompted.
This project is licensed under the
Low Zhi Horng