Skip to main content

Hill Cipher (Encryption and Decryption)

Project description

Hill Cipher

The project is about Hill Cipher Encryption and Decryption

It allows to encrypt the text using the Hill Cipher technique, and decryption can be done as well. Checkout the snippets below.

Note : Provide the input in the capital letters.

import hillcipher as hc

key = [[17,17,5],[21,18,21],[2,2,19]]
text = "PAY MORE MONEY"

enc = hc.encrypt(text, key)
dec = hc.decrypt(enc, key)

print(enc, dec)

The $2^{nd}$ parameter (i.e., key) is optional and can be excluded, but ensure that the count of alphabets in the input string are the multiples of 3.

import hillcipher as hc

text = "PAY MORE MONEY"

enc = hc.encrypt(text)
dec = hc.decrypt(enc)

print(enc, dec)

The complete code can be found @ www.github.com/Kirandeep2806/Hill-Cipher

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hillcipher-0.0.4.tar.gz (2.6 kB view hashes)

Uploaded Source

Built Distribution

hillcipher-0.0.4-py3-none-any.whl (2.8 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