Skip to main content

AEIF (AES Encrypted Image File) Library

The AEIF (AES Encrypted Image File) library is a Python library that provides functionality for encrypting and decrypting image files using the AES encryption algorithm.

Installation

You can install the AEIF library using pip:

pip install aeif-lib

Usage

Generating a key

To generate a key, you can use the genkey function:

from aeif_lib import genkey

# Generate a random key with the specified size
# (only 16, 24, and 32 bytes is supported) and save it to a file
key_path, key = genkey("path/to/save/key")

Encrypting an image

To encrypt an image, you can use the encrypt function:

from aeif_lib import AEIFManager, genkey, verify_hash

key_path, _ = genkey("path/to/save/key", 32)

# Create an AEIFManager object
# (key_path is optional but will be required for encryption/decryption if not set)
aeif = AEIFManager(key_path)

# Encrypt the image (key or key_path is optional if the key is already set)
aeif.encrypt("./img.png", "./img_e.aeif")

Decrypting an image

To decrypt an image, you can use the decrypt function:

from aeif_lib import AEIFManager

key_path = "path/to/the/key"

# Create an AEIFManager object
# (key_path is optional but will be required for encryption/decryption if not set)
aeif = AEIFManager(key_path)

# Decrypt the image (key or key_path is optional if the key is already set)
aeif.decrypt("./img_e.aeif", "./img_d.png")

# Verify the hash of the original image and the decrypted image
verify = verify_hash(("./img.png", "./img_d.png"))
print("Hashes match!" if verify else "Hashes do not match!")

Metadata

Release files for aeif-lib 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aeif-lib 0.0.3
File Size Uploaded Provenance
aeif-lib-0.0.3.tar.gz 4.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for aeif-lib 0.0.3
File Interpreter ABI Platform
aeif_lib-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 8.2 kB

Release files / aeif-lib-0.0.3.tar.gz

Download URL aeif-lib-0.0.3.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ccaeb67e8471399e40bad452908725105e6d1a9cc5bda479a8b2f74949f4cd30
BLAKE2b-256 checksum
How to use checksums
b037ff9911de9543b0b4a8642d96abc7227f0859973ea82c9ab1579669e66db2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.11

Release files / aeif_lib-0.0.3-py3-none-any.whl

Download URL aeif_lib-0.0.3-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ed1d918a58cd2b745b63fd6e6e24656c0f4758655fa52440e27e163553e16f6c
BLAKE2b-256 checksum
How to use checksums
c427b5bc4f6732e593dec1b900ab5238e793820294555073ae1248e35ba04600
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.11

Security for aeif-lib 0.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page