Skip to main content

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 pycryptodome for 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aes_gcm_txt_enc_lib-0.2.0.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aes_gcm_txt_enc_lib-0.2.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

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

Hashes for aes_gcm_txt_enc_lib-0.2.0.tar.gz
Algorithm Hash digest
SHA256 2e0cc832f93b0e8a09f17e826527e4c332a6174041b5369277479c55a8f06b11
MD5 37d00e6362ddab8d15d093c4c932bb74
BLAKE2b-256 e87e2bfa89a2624541cdb785d59c4064054bf0fdf37d97c7c4a56c1dd30c7547

See more details on using hashes here.

File details

Details for the file aes_gcm_txt_enc_lib-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for aes_gcm_txt_enc_lib-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b597c70e6f7bfdddcc140fddbe09884b5687897695c93bff5404102d7fa75d23
MD5 d8f071c4b88b9f11db4e8cf96355f765
BLAKE2b-256 c1a1240e3422c29579cbb952bae568d7c448519f577a31e26bb19fb14f5b5d0a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page