Skip to main content

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

This version

0.1

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)

Uploaded Source

Built Distribution

playfairpolycipher-0.1-py3-none-any.whl (3.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page