PyLockAES is a Python library that provides AES encryption and decryption functionality. It is designed to make it easy for developers to add encryption to their Python projects.
You can install PyLockAES using pip:
pip install pylockaes
To encrypt a file, you first need to create an instance of the AESEncryption class with a password:
from pylockaes import AESEncryption
password = "mysecretpassword"
encryption = AESEncryption(password)
Then you can call the encrypt_file method with the input and output file paths:
encryption.encrypt_file("input_file.txt", "output_file.bin")
To decrypt a file, you create an instance of the AESEncryption class with the same password as before:
from pylockaes import AESEncryption
password = "mysecretpassword"
encryption = AESEncryption(password)
Then you can call the decrypt_file method with the input and output file paths:
encryption.decrypt_file("encrypted_file.bin", "decrypted_file.txt")
Please note that PyLockAES uses a random nonce for each encryption operation to ensure that the same plaintext doesn't encrypt to the same ciphertext.
Contributions are welcome! If you have a bug fix, enhancement, or new feature to contribute, please open a pull request.
PyLockAES is licensed under the MIT License.
Please note that while PyLockAES provides AES encryption and decryption functionality, it is not a substitute for a properly-designed encryption library for use in production environments. This library is intended for educational purposes and hobby projects only.
Feel free to modify it to better suit your needs!