A lightweight, interactive desktop application built with Python and the tkinter library. This tool allows users to easily encrypt and decrypt text using the classic Caesar Cipher technique through a clean and intuitive Graphical User Interface (GUI).
The Caesar Cipher is one of the simplest and most widely known encryption techniques. It is a type of substitution cipher in which each letter in the plaintext is replaced by another letter positioned a fixed number of places down the alphabet.
- Bi-Directional Processing: Easily switch between Encryption and Decryption modes using radio buttons.
- Custom Shift Values: Enter any numeric shift value to customize the cipher.
- Text Preservation: Preserves uppercase and lowercase letters while leaving spaces, numbers, and special characters unchanged.
- Input Validation: Includes built-in error handling to prevent crashes when invalid shift values are entered.
- Text Traversal: The application processes each character in the input text.
- Alphabet Shifting: If a character is alphabetical, its ASCII value is shifted forward (for encryption) or backward (for decryption) based on the user-defined shift value.
- Modulo Wrapping: The formula
((ord(char) - base + shift_val) % 26 + base)ensures that letters wrap around the alphabet correctly (e.g.,Zshifted by 1 becomesA). - GUI Output: Non-alphabetic characters remain unchanged, and the processed text is displayed in the application window.
Ensure that Python 3.x is installed on your system.
Note for Linux Users: While
tkinteris typically included with Python on Windows and macOS, Linux users (Ubuntu/Debian) may need to install it manually:sudo apt-get install python3-tk
-
Clone the Repository:
git clone https://github.com/ranejai954/ceaser-cypher-source-script.git cd ceaser-cypher-source-script -
Run the Application:
python "Ceaser Cypher.py"