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
playfairpolycipher-0.1.tar.gz
(3.2 kB
view hashes)
Built Distribution
Close
Hashes for playfairpolycipher-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 274bdc076168c733fdedb624fc5ef9c613180d2f4fd1253bb9409cd1882101e4 |
|
MD5 | af941364b9f0b8e145da1fe77eca484d |
|
BLAKE2b-256 | ce6cc7b29ca697a80801ff5f4fd082c9e54cefd81bc9679ea0f298a8aa6e4ba3 |