A Python library for the Playfair Cipher
Project description
# Playfair Poly Cipher
Playfair Poly Cipher(Polyalphabetic Playfair cipher) is a Python library that provides tools for encrypting and decrypting text using the Playfair Cipher with a customizable key matrix.
## Installation
You can install Poly Playfair Cipher using pip:
```bash
pip install poly-playfair-cipher
Example
Encrypting Text
from playfairpolycipher import PlayfairCipher
# Define a key for the Playfair Cipher
key = "KEYWORD"
# Initialize the PlayfairCipher with the key
cipher = PlayfairCipher(key)
# Encrypt a plaintext
plaintext = "HELLO WORLD"
ciphertext = cipher.encrypt(plaintext)
print("Ciphertext:", ciphertext)
Decrypting Text
from playfairpolycipher import PlayfairCipher
# Define a key for the Playfair Cipher
key = "KEYWORD"
# Initialize the PlayfairCipher with the key
cipher = PlayfairCipher(key)
# Decrypt a ciphertext
ciphertext = "ILIDGJZTJG"
plaintext = cipher.decrypt(ciphertext)
print("Decrypted Text:", plaintext)
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file playfairpolycipher-0.1.tar.gz.
File metadata
- Download URL: playfairpolycipher-0.1.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed7fdace08ae6fa9d358185a03547b1409bd41da57a585185ca5843d5a787333
|
|
| MD5 |
f176d88157a11af594bc5ad86f08f250
|
|
| BLAKE2b-256 |
30351005ed4d4acc5cfcfc1c8a4b8c155c8dac512ef93307513af093742b6e51
|
File details
Details for the file playfairpolycipher-0.1-py3-none-any.whl.
File metadata
- Download URL: playfairpolycipher-0.1-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
274bdc076168c733fdedb624fc5ef9c613180d2f4fd1253bb9409cd1882101e4
|
|
| MD5 |
af941364b9f0b8e145da1fe77eca484d
|
|
| BLAKE2b-256 |
ce6cc7b29ca697a80801ff5f4fd082c9e54cefd81bc9679ea0f298a8aa6e4ba3
|