CaesarCipher.extended

PyPI version License Test Status Total Downloads PyPI Downloads Repository Visits Issues Stars

CaesarCipher.extended

Simple, creative, and practical Caesar cipher encryption for Python projects.


πŸš€ Why CaesarCipher.extended?

Ever wanted to add a layer of protection to your data without the complexity of modern cryptography? CaesarCipher.extended brings the classic Caesar cipher to Python, making it easy to obfuscate text, passwords, usernames, and more. It’s not military-grade, but it’s a huge step up from plain text!


πŸ”‘ What is the CaesarCipher.extended?

The Caesar cipher is one of the oldest and simplest encryption techniques. Each character in your text is shifted by a fixed number of positions. This package extends the classic algorithm to support:

You choose what gets encrypted and how!


✨ Features


πŸ“¦ Installation

Install from PyPI:

pip install CaesarCipher.extended

Or clone from GitHub:

git clone https://github.com/ViratiAkiraNandhanReddy/CaesarCipher.extended.git
cd CaesarCipher.extended

πŸ› οΈ Usage

Encrypting Text

from CaesarCipher import Encryption

# Basic encryption
enc = Encryption("Hello, World! 123")
print("Encrypted:", enc.encrypt())

# Advanced: shift everything
enc2 = Encryption("Secret123!😊", shift = 7, alterNumbers = True, alterSymbols = True)
print("Encrypted:", enc2.encrypt())

Decrypting Text

from CaesarCipher import Decryption

# Basic decryption
dec = Decryption("Olssv, Dvysk! 890", shift = 7, isNumbersAltered = True, isSymbolsAltered = True)
print("Decrypted:", dec.decrypt())

File-based Encryption / Decryption

You can encrypt or decrypt files in-place using encrypt_file() and decrypt_file() on the corresponding class instances. Both methods read the file contents, replace the file with the transformed text, and return a boolean indicating success.

from CaesarCipher import Encryption, Decryption

# Encrypt a file in-place
enc = Encryption(shift = 4, alterNumbers = True, alterSymbols = True)
ok = enc.encrypt_file('secrets.txt')
if ok:
		print('File encrypted')

# Decrypt a file in-place
dec = Decryption(shift = 4, isNumbersAltered = True, isSymbolsAltered = True)
ok = dec.decrypt_file('secrets.txt')
if ok:
		print('File decrypted')

Notes:


πŸ“š API Reference

Encryption

Encryption(text: str, shift: int = 3, alterSymbols: bool = False, alterNumbers: bool = False)

.encrypt() -> str

Returns the encrypted string.

Decryption

Decryption(text: str, shift: int = 3, isSymbolsAltered: bool = False, isNumbersAltered: bool = False)

.decrypt() -> str

Returns the decrypted string.


πŸ” Comparison Table

See how CaesarCipher transforms your data:

Stage Example Text
Original HelloWorld123!
After Encryption KhoorZruog456!
After Decryption HelloWorld123!

How it works:

You can customize the shift and choose to include digits and symbols for even more flexibility!


⚠️ Limitations & Security


πŸ’‘ When Should You Use This?

πŸ’― : Some encryption is always better than none. This package is a practical upgrade from plain text!


LinkedIn X Instagram Facebook Gist YouTube Website PyPI Mail


πŸ“ License

© 2025 ViratiAkiraNandhanReddy. This project is licensed under the GNU GENERAL PUBLIC LICENSE .


πŸ‘€ Author

Developed by ViratiAkiraNandhanReddy

πŸ’€ - PASSIVE MAINTENANCE : Mean the project is no longer actively developed ( NO New Features And Regular Updates ), but the maintainer will respond only when an issue or PR is raised. Feel free to fork and continue development!


Questions, suggestions, or want to contribute? Open an issue or pull request on GitHub!