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.3.tar.gz (4.6 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.3-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: simple_encryptor-0.2.3.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.18

File hashes

Hashes for simple_encryptor-0.2.3.tar.gz
Algorithm Hash digest
SHA256 e0a660da5bce3dcbf30fbc67eb6e8901361bd564d958b9b49cb5fad38b4e0891
MD5 1bad13f171d9d33ffad6eb4443ca859c
BLAKE2b-256 0bb947409ac837b198f539b031c1b0b8f1a4406575c0dd699015261ea189f562

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for simple_encryptor-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e06a35722a04a4f73cc5899c280c4c938981d26c6df04d311d905490d2464804
MD5 37a3849d61b791d77a51752e3760b5d4
BLAKE2b-256 9b7eb31a2bbe585551ab375dd1c5d66a8ef8e37002c7e46f0ebd7bf133a28536

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