Skip to content

ViratiAkiraNandhanReddy/CaesarCipher.extended-python.pypi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

49 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Project Deprecated - Migration Notice

The original CaesarCipher.extended Python package has been deprecated and moved to a new, better-organized project:

New Hero Repository: https://github.com/ViratiAkiraNandhanReddy/caesarcipher-extended

Python Package Repository: https://github.com/ViratiAkiraNandhanReddy/caesarcipher-extended-py

This change was made to provide a cleaner, more maintainable package structure with many new features, improved organization, better development practices, and a stronger foundation for future updates.

Important Naming Change

Please do not be confused by the package name change.

The previous package was:

CaesarCipher.extended

The new package name is:

caesarcipher-extended

This naming change was intentional to maintain better consistency with PyPI package naming conventions and improve discoverability.

PyPI Name Normalization Notice

Please note that installing using the old package name may still resolve to the new package because PyPI normalizes package names.

For example, names such as:

CaesarCipher.extended
caesarcipher-extended
caesarcipher_extended

are treated as equivalent by PyPI package name normalization rules.

Because of this, attempting to install the old package name from PyPI may install the newer caesarcipher-extended package instead.

This behavior is expected and helps maintain compatibility while transitioning to the new package naming convention.

Apology to Existing Users

A heartfelt apology to everyone who depended on the original package.

The previous release was deleted without a proper migration notice, and we understand that this may have affected existing projects, dependency files, or application structures that relied on this library.

We sincerely apologize for the inconvenience caused.

Temporary Installation of the Old Version

If you still need the old implementation temporarily while migrating, you can install it directly from GitHub:

pip install git+https://github.com/ViratiAkiraNandhanReddy/CaesarCipher.extended-python.pypi

For requirements.txt, use:

git+https://github.com/ViratiAkiraNandhanReddy/CaesarCipher.extended-python.pypi

This should provide enough time to migrate your project to the newer implementation.

Recommended Migration

We strongly recommend moving to the new package:

  • Better organized codebase
  • Improved package structure
  • More features
  • Regular maintenance and updates
  • Future security patches
  • Improved developer experience
  • Long-term support

The new implementation is actively maintained and will be the primary version going forward.

Thank you for your understanding, support, and patience during this transition. ❀️


PyPI version License Repository Visits

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:

  • Letters (upper & lower case)
  • Digits (optional)
  • Symbols (optional)
    • Symbols
    • Emojis (some support)

You choose what gets encrypted and how!


✨ Features

  • Encrypt and decrypt text with a customizable shift
  • Optionally include digits and symbols
  • Input validation for safety
  • Intuitive API for quick integration
  • Perfect for small to mid-scale projects
  • Much better than storing plain text

πŸ“¦ 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:

  • These methods return False when the file does not exist or when the process lacks permission to read/write the file. Other errors will propagate.

πŸ“š API Reference

Encryption

Encryption(text: str, shift: int = 3, alterSymbols: bool = False, alterNumbers: bool = False)
  • text: The string to encrypt
  • shift: How many positions to shift (default: 3)
  • alterSymbols: Shift symbols? (default: False)
  • alterNumbers: Shift digits? (default: False)

.encrypt() -> str

Returns the encrypted string.

Decryption

Decryption(text: str, shift: int = 3, isSymbolsAltered: bool = False, isNumbersAltered: bool = False)
  • text: The string to decrypt
  • shift: How many positions to shift back (default: 3)
  • isSymbolsAltered: Were symbols shifted? (default: False)
  • isNumbersAltered: Were digits shifted? (default: 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:

  • Encryption shifts each character by a fixed amount (default: 3).
  • Decryption reverses the shift, restoring the original text.

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


⚠️ Limitations & Security

  • Not for high-security needs! Vulnerable to brute-force and frequency analysis.
  • Symbol shifting may produce non-printable characters.
  • For real password storage, use cryptographic hashes (bcrypt, Argon2, etc).

πŸ’‘ When Should You Use This?

  • Small to mid-scale projects
  • Obfuscating sensitive data (usernames, passwords, tokens)
  • Educational demos
  • Quick protection for logs or configs

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


🌐 Social & Links

LinkedIn X Instagram Facebook Gist YouTube Website PyPI Mail


πŸ“ License

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


πŸ‘€ Author


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

About

πŸ” Simple Python Caesar Cipher with customizable shifts ➑️ Encrypt text, usernames & passwords πŸ”‘. Beyond the classic, it also shifts numbers πŸ”’, symbols, and emojis ✨. Perfect for small-to-medium projects πŸš€. ⚠️ Some encryption is always better than none βœ…. https://viratiakiranandhanreddy.github.io/CaesarCipher.extended-python.pypi/

Topics

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Contributors

Languages