AesBridge is a modern, secure and cross-language AES encryption library
Project description
AesBridge Python
AesBridge is a modern, secure and cross-language AES encryption library that supports GCM and CBC modes
This is the Python implementation of the core project.
👉 Main repository: https://github.com/mervick/aes-bridge
Features
- 🔒 AES-256 encryption in GCM and CBC modes
- 🌐 Unified cross-language design
- 📦 Compact binary format or base64 output
- 🐍 Pure Python with zero dependencies (except
cryptography)
Quick Start
Installation
pip install aes-bridge
Usage
from aes_bridge import encrypt, decrypt
ciphertext = encrypt("My secret message", "MyStrongPass")
plaintext = decrypt(ciphertext, "MyStrongPass")
API Reference
Main Functions (GCM by default)
-
encrypt(data, passphrase)
Encrypts a string using AES-GCM (default).
Returns: base64-encoded string. -
decrypt(ciphertext, passphrase)
Decrypts a base64-encoded string encrypted with AES-GCM.
CBC Mode
-
encrypt_cbc(data, passphrase)
Encrypts a string using AES-CBC. HMAC is used for integrity verification.
Returns: base64-encoded string. -
decrypt_cbc(ciphertext, passphrase)
Decrypts a base64-encoded string encrypted withencrypt_cbcand verifies HMAC. -
encrypt_cbc_bin(data, passphrase)
Returns encrypted binary data using AES-CBC with HMAC. -
decrypt_cbc_bin(ciphertext, passphrase)
Decrypts binary data encrypted withencrypt_cbc_binand verifies HMAC.
GCM Mode
-
encrypt_gcm(data, passphrase)
Encrypts a string using AES-GCM. Returns: base64-encoded string. -
decrypt_gcm(ciphertext, passphrase)
Decrypts a base64-encoded string encrypted withencrypt_gcm. -
encrypt_gcm_bin(data, passphrase)
Returns encrypted binary data using AES-GCM. -
decrypt_gcm_bin(ciphertext, passphrase)
Decrypts binary data encrypted withencrypt_gcm_bin.
Legacy Compatibility
⚠️ These functions are kept for backward compatibility only. Their usage is strongly discouraged in new applications.
-
encrypt_legacy(data, passphrase)
Encrypts a string in the legacy AES Everywhere format. -
decrypt_legacy(ciphertext, passphrase)
Decrypts a string encrypted in the legacy AES Everywhere format.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aes_bridge-2.0.2.tar.gz.
File metadata
- Download URL: aes_bridge-2.0.2.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6bd733f664648074e815f524f15625a719ae130d7333216b5ef766559e66fb50
|
|
| MD5 |
fd1f33783c35ec6371bda231f858eca1
|
|
| BLAKE2b-256 |
54a0a5772f430e5fb165daa61deffa479b642b9d909bf303ad301597d3596444
|
Provenance
The following attestation bundles were made for aes_bridge-2.0.2.tar.gz:
Publisher:
publish-to-pypi.yml on mervick/aes-bridge-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aes_bridge-2.0.2.tar.gz -
Subject digest:
6bd733f664648074e815f524f15625a719ae130d7333216b5ef766559e66fb50 - Sigstore transparency entry: 273994064
- Sigstore integration time:
-
Permalink:
mervick/aes-bridge-python@8d1427f468a03ccbb9b5a4579c91af6cec292870 -
Branch / Tag:
refs/tags/v2.0.2 - Owner: https://github.com/mervick
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@8d1427f468a03ccbb9b5a4579c91af6cec292870 -
Trigger Event:
release
-
Statement type:
File details
Details for the file aes_bridge-2.0.2-py3-none-any.whl.
File metadata
- Download URL: aes_bridge-2.0.2-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f0a52d9cadab37913003b6df39d4350132a3405ed39b6b8c8920a545cd6729f
|
|
| MD5 |
cb74f0605b1189d5f2a59835d96ff25d
|
|
| BLAKE2b-256 |
9d0b0d1ef3ec702116abf704157e2b33d45339b77bf8d48ea7440127a112dd8f
|
Provenance
The following attestation bundles were made for aes_bridge-2.0.2-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on mervick/aes-bridge-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aes_bridge-2.0.2-py3-none-any.whl -
Subject digest:
7f0a52d9cadab37913003b6df39d4350132a3405ed39b6b8c8920a545cd6729f - Sigstore transparency entry: 273994071
- Sigstore integration time:
-
Permalink:
mervick/aes-bridge-python@8d1427f468a03ccbb9b5a4579c91af6cec292870 -
Branch / Tag:
refs/tags/v2.0.2 - Owner: https://github.com/mervick
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@8d1427f468a03ccbb9b5a4579c91af6cec292870 -
Trigger Event:
release
-
Statement type: