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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

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

Hashes for playfairpolycipher-0.1.tar.gz
Algorithm Hash digest
SHA256 ed7fdace08ae6fa9d358185a03547b1409bd41da57a585185ca5843d5a787333
MD5 f176d88157a11af594bc5ad86f08f250
BLAKE2b-256 30351005ed4d4acc5cfcfc1c8a4b8c155c8dac512ef93307513af093742b6e51

See more details on using hashes here.

File details

Details for the file playfairpolycipher-0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for playfairpolycipher-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 274bdc076168c733fdedb624fc5ef9c613180d2f4fd1253bb9409cd1882101e4
MD5 af941364b9f0b8e145da1fe77eca484d
BLAKE2b-256 ce6cc7b29ca697a80801ff5f4fd082c9e54cefd81bc9679ea0f298a8aa6e4ba3

See more details on using hashes here.

Supported by

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