Skip to main content

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


Download files

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

Source Distribution

pdat_aes_encryptor-0.2.0.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

pdat_aes_encryptor-0.2.0-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file pdat_aes_encryptor-0.2.0.tar.gz.

File metadata

  • Download URL: pdat_aes_encryptor-0.2.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

Hashes for pdat_aes_encryptor-0.2.0.tar.gz
Algorithm Hash digest
SHA256 9ec200ede9a267c881039080e16e78e8dafecce0ec4435fffcaea2573a41f005
MD5 1ff9b3099daa4a81ada7dc5d74413879
BLAKE2b-256 dd829a023072398dda092f30d7c05f117ebea7730f68f70172df108ba5ed1928

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pdat_aes_encryptor-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bfbb024d8ba2e5aa592a1a587894d65d794d81d155d60b4e2991c9ea01d5d602
MD5 301c6ec2f254522c1e61142a197719af
BLAKE2b-256 926115ae246880c92438e830fcf33222258b908f943d2dc6cf35d60ecc4a4076

See more details on using hashes here.

Supported by

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