Skip to main content

A Python library for text encryption and decryption

Project description

Cryptodo

Cryptodo is a Python library for text encryption and decryption. It provides various encryption methods such as Caesar cipher, substitution cipher, rail fence cipher, and more. This library is designed to be easy to use and can be integrated into your Python projects for secure data handling.

Installation

You can install Cryptodo using pip:

pip install cryptodo

Usage

Crypto Class

The Crypto class provides methods for basic text encryption and decryption.

from cryptodo import Crypto

# Encryption
cipher = Crypto("Hello World!", 3)
encrypted_text = cipher.encrypt()  # Returns encrypted text

# Decryption
decipher = Crypto(encrypted_text, 3)
decrypted_text = decipher.decrypt()  # Returns decrypted text

KeyGenerator Class

The KeyGenerator class offers methods to generate cryptographic keys.

from cryptodo import KeyGenerator

# Generate a key (Example)
key = KeyGenerator.key_generator_num_v1(1, 10)  # Returns a random key

CryptoV2 Class

The CryptoV2 class introduces more advanced encryption techniques.

from cryptodo import CryptoV2

# Encryption
cipher = CryptoV2("Hello World!", "key")
encrypted_text = cipher.encrypt()  # Returns encrypted text

# Decryption
decipher = CryptoV2(encrypted_text, "key")
decrypted_text = decipher.decrypt()  # Returns decrypted text

CryptoV3Num Class

The CryptoV3Num class specializes in numeric encryption and decryption.

from cryptodo import CryptoV3Num

# Encryption
cipher = CryptoV3Num(123456, 5)
encrypted_number = cipher.encrypt()  # Returns encrypted number

# Decryption
decipher = CryptoV3Num(encrypted_number, 5)
decrypted_number = decipher.decrypt()  # Returns decrypted number

KeyVariable Class

The KeyVariable class provides predefined character sets for key generation.

from cryptodo import KeyVariable

all_characters = KeyVariable.key_var_all  # Contains all alphanumeric and special characters

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

cryptodo-3.3.tar.gz (4.8 kB view details)

Uploaded Source

File details

Details for the file cryptodo-3.3.tar.gz.

File metadata

  • Download URL: cryptodo-3.3.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.5

File hashes

Hashes for cryptodo-3.3.tar.gz
Algorithm Hash digest
SHA256 a2f2ddcb1feb35d9bea264e79629e7c7c080b50627139e9b54b8496a8e8f5c2f
MD5 bc89daf2dc77747acaf9baaf5bae2078
BLAKE2b-256 fab8bf5cf1ac4149c9b1f3c065ad0d8e89a8f2f7cb321a46935a3586f602511b

See more details on using hashes here.

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