Python library for symmetric key based secure text encryption and decryption using AES-GCM.
Project description
aes-gcm-txt-enc-lib
Python library for symmetric key based secure text encryption and decryption using AES-GCM.
Features
- AES-GCM symmetric encryption for text data
- Support for multiple key lengths (128, 192, 256 bits)
- Easy-to-use API for encryption and decryption
- Built on
pycryptodomefor cryptographic primitives
Installation
Install via PyPI:
pip install aes-gcm-txt-enc-lib
Usage Example
from aes_gcm_txt_enc_lib import AesGcmEncryptor
txt = "Hello this is text"
print("Original Text: ", txt)
# Create an encryptor with a 256-bit random key
a = AesGcmEncryptor(key_size=256)
cipher = a.encrypt(txt)
key = a.get_key()
print("Key: ", key)
print("Encrypted: ", cipher)
# Create a new encryptor with the same key for decryption
b = AesGcmEncryptor(key)
plain = b.decrypt(cipher)
print("Decrypted: ", plain)
📄 Changelog
See CHANGELOG.md for version history.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aes_gcm_txt_enc_lib-0.2.0.tar.gz.
File metadata
- Download URL: aes_gcm_txt_enc_lib-0.2.0.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.12.10 Linux/4.14.141+
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e0cc832f93b0e8a09f17e826527e4c332a6174041b5369277479c55a8f06b11
|
|
| MD5 |
37d00e6362ddab8d15d093c4c932bb74
|
|
| BLAKE2b-256 |
e87e2bfa89a2624541cdb785d59c4064054bf0fdf37d97c7c4a56c1dd30c7547
|
File details
Details for the file aes_gcm_txt_enc_lib-0.2.0-py3-none-any.whl.
File metadata
- Download URL: aes_gcm_txt_enc_lib-0.2.0-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.12.10 Linux/4.14.141+
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b597c70e6f7bfdddcc140fddbe09884b5687897695c93bff5404102d7fa75d23
|
|
| MD5 |
d8f071c4b88b9f11db4e8cf96355f765
|
|
| BLAKE2b-256 |
c1a1240e3422c29579cbb952bae568d7c448519f577a31e26bb19fb14f5b5d0a
|