Cryptizia
Cryptizia is a Python library for various cipher techniques including the Caesar cipher.
Installation
You can install the library using pip:
pip install cryptizia
How to use in Code
Caeser Cipher
from cryptizia import CaesarCipherExample
CaesarCipherExample()
Customization
You can customize the 'shift' and 'plaintext' directly in the constructor if you want different values:
# Example with custom shift and plaintext
cipher = CaesarCipherExample(shift=5, plaintext="WORLD")
You can encrypt and decrypt whole file using Caeser Cipher class
from CaeserCipher import CaesarCipher
# Example usage with a file
def encrypt_file(input_file, output_file, shift):
cipher = CaesarCipher()
# Read the content of the input file
with open(input_file, 'r') as file:
file_content = file.read()
# Encrypt the content
encrypted_content = cipher.caesar_encrypt(file_content, shift)
# Write the encrypted content to the output file
with open(output_file, 'w') as file:
file.write(encrypted_content)
def decrypt_file(input_file, output_file, shift):
cipher = CaesarCipher()
# Read the content of the input file
with open(input_file, 'r') as file:
file_content = file.read()
# Decrypt the content
decrypted_content = cipher.caesar_decrypt(file_content, shift)
# Write the decrypted content to the output file
with open(output_file, 'w') as file:
file.write(decrypted_content)
# Example: Encrypting and decrypting a file
encrypt_file('example.txt', 'encrypted.txt', 3) # Encrypt 'example.txt' with a shift of 3 and save it as 'encrypted.txt'
decrypt_file('encrypted.txt', 'decrypted.txt', 3) # Decrypt 'encrypted.txt' with a shift of 3 and save it as 'decrypted.txt'
Playfair Cipher
from cryptizia import PlayfairCipherExample
PlayfairCipherExample()
Metadata
Release files for Cryptizia 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| Cryptizia-0.2.1.tar.gz | 5.9 kB | Without provenance | Details for Cryptizia-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| Cryptizia-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for Cryptizia-0.2.1-py3-none-any.whl |
Total release size: 13.2 kB
Release files / Cryptizia-0.2.1.tar.gz
| Download URL | Cryptizia-0.2.1.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bcfd22b64f8ff2bb2c9298668e9f735b0e8ae6b06f281a3c55e81b939aac8405
|
|
BLAKE2b-256 checksum How to use checksums |
c681db88e5616803c9ade9085c4f0e2421b17a0109c32f00492718f31ff10457
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.4
|
Release files / Cryptizia-0.2.1-py3-none-any.whl
| Download URL | Cryptizia-0.2.1-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2f286debb0f4ccfcef151a13d1c66a998ae1ccbf7ea9b356b8b307d5cb2729c5
|
|
BLAKE2b-256 checksum How to use checksums |
78e8b2f658f72e0533ac74db1385fa58b0b5254f65430ba4c7900184ec386385
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.4
|
Security for Cryptizia 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.