The Encryption Tool is a Python-based application designed to provide secure encryption and decryption functionalities. It allows users to encrypt plaintext into ciphertext and decrypt ciphertext back into plaintext using specified algorithms.
- Encryptor: A class that provides methods to encrypt plaintext.
- Decryptor: A class that provides methods to decrypt ciphertext.
- Utility Functions: Includes functions for generating secure keys and hashing passwords.
To get started with the Encryption Tool, you need to install the required dependencies. You can do this by running the following command:
pip install -r requirements.txt
To encrypt data, you can use the Encryptor class from the encryptor.py file. Here is a simple example:
from src.encryptor import Encryptor
encryptor = Encryptor()
encryptor.set_key('your_secure_key')
ciphertext = encryptor.encrypt('Your plaintext message')
print(ciphertext)To decrypt data, you can use the Decryptor class from the decryptor.py file. Here is an example:
from src.decryptor import Decryptor
decryptor = Decryptor()
decryptor.set_key('your_secure_key')
plaintext = decryptor.decrypt(ciphertext)
print(plaintext)The project also includes utility functions for key generation and password hashing, which can be found in crypto_utils.py.
To generate a secure key, you can use the generate_key function:
from src.utils.crypto_utils import generate_key
key = generate_key()
print(key)To hash a password securely, use the hash_password function:
from src.utils.crypto_utils import hash_password
hashed_password = hash_password('your_password')
print(hashed_password)Contributions are welcome! Please feel free to submit a pull request or open an issue for any enhancements or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for more details.