Skip to content

ranejai954/ceaser-cypher-source-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Caesar Cipher GUI Application

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).


What Is This?

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.

Key Features

  • 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.

How It Works

  1. Text Traversal: The application processes each character in the input text.
  2. 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.
  3. Modulo Wrapping: The formula ((ord(char) - base + shift_val) % 26 + base) ensures that letters wrap around the alphabet correctly (e.g., Z shifted by 1 becomes A).
  4. GUI Output: Non-alphabetic characters remain unchanged, and the processed text is displayed in the application window.

Local Installation and Setup

Prerequisites

Ensure that Python 3.x is installed on your system.

Note for Linux Users: While tkinter is typically included with Python on Windows and macOS, Linux users (Ubuntu/Debian) may need to install it manually:

sudo apt-get install python3-tk

Steps to Run Locally

  1. Clone the Repository:

    git clone https://github.com/ranejai954/ceaser-cypher-source-script.git
    cd ceaser-cypher-source-script
  2. Run the Application:

    python "Ceaser Cypher.py"

About

A lightweight Python desktop application built with Tkinter that implements the classic Caesar Cipher. It features an intuitive, user-friendly graphical interface (GUI) to easily encrypt and decrypt text with customizable numeric shifts, while safely handling spaces, punctuation, and input validation.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages