Skip to content

LowZhiHorng/Encryption_Decryption

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🔐 Encryption & Decryption System — Python CLI Tool

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.

License: MIT Python CLI Tool Base Encoding Base16 Base32 Base85 Repetition GitHub


📖 Introduction

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.


✨ Features

🔒 Encryption

  • Choose between Base85, Base64, Base32, or Base16
  • Input any UTF-8 text
  • Get an encoded string instantly

🔓 Decryption

  • Decode Base85, Base64, Base32, or Base16 strings back to plain text
  • Handles invalid inputs with error messages
  • ASCII input validation for correct decoding

📋 Supported Encodings

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

📂 Project Structure

Encryption_Decryption-main/
├── README.md         # Project documentation
├── encode.py         # Encryption script (Base85, Base64, Base32, Base16)
└── decode.py         # Decryption script (Base85, Base64, Base32, Base16)

🛠 Installation Guide

  1. Install Python:

    Ensure Python 3.8+ is installed:

    Download Python

  2. Download or Clone the Project

    git clone https://github.com/LowZhiHorng/Encryption_Decryption.git
    cd Encryption_Decryption-main
  3. Run the Program

    • For encryption:

      python encode.py
    • For decryption:

      python decode.py

🚀 Usage

🔒 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

❗ Troubleshooting

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.


📜 License

This project is licensed under the License: MIT


👤 Author

Low Zhi Horng

📂 GitHub: GitHub

About

A simple base85/64/32/16 encryption and decryption coding

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages