Skip to main content

A secure AES-GCM encryption/decryption package

Project description

Simple Encryptor

A secure and easy-to-use AES-GCM encryption/decryption package for Python.

Why Use Simple Encryptor?

  • No Key Management Hassle: Just provide any key of your choice - no strict length requirements
  • Military-Grade Security: Uses AES-GCM encryption (same standard used by banks and governments)
  • Zero Configuration: Works out of the box with minimal setup
  • Cross-Platform: Works on Windows, Mac, and Linux

Quick Start

Installation

pip install simple-encryptor

Basic Usage

from simple_encryptor import Encryptor

# Create an encryptor with your chosen key
encryptor = Encryptor("my-secret-key-123")

# Encrypt your data
data = "Hello, World!"
encrypted = encryptor.encrypt(data)
print(f"Encrypted: {encrypted}")

# Decrypt your data
decrypted = encryptor.decrypt(encrypted)
print(f"Decrypted: {decrypted}")

Advanced Usage

from simple_encryptor import Encryptor

# Initialize with your key
encryptor = Encryptor("your-secret-key")

# Encrypt sensitive data
sensitive_data = "This is confidential information"
encrypted_data = encryptor.encrypt(sensitive_data)

# Store or transmit the encrypted data
print(f"Encrypted: {encrypted_data}")

# Later, decrypt the data
decrypted_data = encryptor.decrypt(encrypted_data)
print(f"Decrypted: {decrypted_data}")

Key Features

  • Any Key Length: Use any key you want - short or long, it doesn't matter
  • Automatic Key Derivation: Your key is securely hashed using SHA-256 to meet encryption standards
  • AES-256-GCM Encryption: Military-grade encryption with built-in authentication
  • Tamper Detection: Built-in integrity checking prevents data tampering
  • Base64 Encoded Output: Encrypted data is base64 encoded for easy storage and transmission

Error Handling

The package includes comprehensive error handling:

from simple_encryptor import Encryptor

try:
    encryptor = Encryptor("my-key")
    encrypted = encryptor.encrypt("sensitive data")
    decrypted = encryptor.decrypt(encrypted)
except ValueError as e:
    print(f"Invalid input: {e}")
except Exception as e:
    print(f"Encryption error: {e}")

Perfect For

  • Protecting sensitive configuration data
  • Encrypting user data in applications
  • Securing API keys and credentials
  • Adding encryption to existing Python projects
  • Protecting data in transit or at rest

Requirements

  • Python 3.8 or higher
  • cryptography library (automatically installed)

Installation

pip install simple-encryptor

Version

Current version: 0.2.1

License

MIT License - Use it freely in your projects!

Contributing

Feel free to submit issues and enhancement requests!

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

simple_encryptor-0.2.2.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

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

simple_encryptor-0.2.2-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file simple_encryptor-0.2.2.tar.gz.

File metadata

  • Download URL: simple_encryptor-0.2.2.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for simple_encryptor-0.2.2.tar.gz
Algorithm Hash digest
SHA256 6230d13b93e6320ce1381341d354d87e92553f9ff2bceac95c6e5d3e96a32b42
MD5 c7fcea9bde0a27a3450befd966e1c168
BLAKE2b-256 06afc4f173bad7a4cb1de00557d463ab7e2e9e104a99a3875f9f5fb46d6d2a70

See more details on using hashes here.

File details

Details for the file simple_encryptor-0.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for simple_encryptor-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6695fb4ec927401f870dcbb61b89f4f033601ab4d068424db8e1b335532b6213
MD5 dc7147ebe38d5ff0f19efb4d186b02be
BLAKE2b-256 5c667441af90308b6de965bf778805e917a8952857bee674fe91b41d8c60c9cb

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