Skip to main content

A text encryption/decryption package

Project description

Textcipher

Python module for text based cipher(s)

List of available ciphers:

  • caesar Cipher (Shift Cipher)
  • more coming soon.....

Example

  • Caesar Cipher
from Textcipher.Ciphers import Caesar

# Example message
msg = "A quick brown fox jumped over the lazy dog."
# Our key for encryption and decryption
key = 23

# the message, key and the mode must be passed to the instance of Caesar
# encryption or decryption depends on the 'mode' parameter. if mode is set True while encrypting then it must be
# set to False for decrypting and vice versa.

encrypt = Caesar(msg, key, True)
encrypted_msg = encrypt.crypto()
print(encrypted_msg)

decrypt = Caesar(encrypt.crypto(), key, False)
decrypted_msg = decrypt.crypto()
print(decrypted_msg)

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

Textcipher-0.0.1.tar.gz (2.1 kB view hashes)

Uploaded Source

Built Distribution

Textcipher-0.0.1-py3-none-any.whl (3.4 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