AES Encryptor
Project description
AES Encryptor/Decryptor
Description
This project provides a class AESEncryptor for encrypting and decrypting text using the AES (Advanced Encryption Standard) algorithm. The class includes methods for both encryption and decryption, ensuring secure data transmission.
Installation
To use this project, you need to install the required dependencies. You can do this using poetry:
pip install pdat-aes-encryptor
or
poetry add pdat-aes-encryptor
Usage
Encryption
To encrypt text, use the encrypt_aes method:
from pdat_aes_encryptor.aes_encryptor import AESEncryptor
key = "your_secret_key_here" # Ensure the key length is 16, 24, or 32 characters
plain_text = "Hello, World!"
encrypted_text = AESEncryptor.encrypt_aes(plain_text, key)
print(f"Encrypted text: {encrypted_text}")
Decryption
To decrypt text, use the decrypt_aes method:
from pdat_aes_encryptor.aes_encryptor import AESEncryptor
key = "your_secret_key_here" # Ensure the key length is 16, 24, or 32 characters
cipher_text = b'\xbb\x08\x80\xc3\r\\V\xa8D\x1f\x82$\xf6\xca8\xe0 \xa1>\x8c\x9fj+{\xb5\xcf\xf7\xa8\xf7\x85O\xf4'
decrypted_text = AESEncryptor.decrypt_aes(cipher_text, key)
print(f"Decrypted text: {decrypted_text}")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pdat_aes_encryptor-0.3.0.tar.gz
.
File metadata
- Download URL: pdat_aes_encryptor-0.3.0.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81fa7fbc55c6e3ecc5db4416cd27a5285f7b65a78e23198a0268b104e1400f2f |
|
MD5 | 0cdfa37d833435337b5d90f10964590a |
|
BLAKE2b-256 | 25502388484a82d44bd2b6f77a96776ed34b92c69949b90677db45ad31ffb360 |
File details
Details for the file pdat_aes_encryptor-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: pdat_aes_encryptor-0.3.0-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1086655cf54c9fb7fa86ccb1c620bfe0dcb588c6bd3be0de7ccd95a22c45400 |
|
MD5 | 9b0f41dceea0fa8e5419cdf9fb3eed16 |
|
BLAKE2b-256 | f5ed4a2b53e1bfb3bc5c4581d05a47f743a8a51c6901efa128ec8f4cf0fb9735 |