Registry / auth-security / unicrypto

unicrypto

JSON →
library0.0.12pypypi✓ verified 81d ago

Unified interface for cryptographic libraries in Python. Current version 0.0.12 provides a consistent API across backends like cryptography, pycryptodome, and hashlib. Release cadence is sporadic; last update 2022.

pip install unicrypto
INSTALL
IMPORT
SIG · UNICRYPTO
U
unicrypto
auth-securitypythonv0.0.12
Install
2.1s avg
Import
Disk
26MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.0.12 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 27.1MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.1s · import 0.000s · 28MB
26MB installed
● package 26MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

get_cipher_by_name
from unicrypto import get_cipher_by_name
from unicrypto import Cipher
get_preferred_cipher
from unicrypto import get_preferred_cipher
use_library
from unicrypto import use_library

Encrypt a message using AES-CBC with a key and IV from environment variables.

from unicrypto import Cipher, symmetric import os key = os.environ.get('KEY', '00112233445566778899aabbccddeeff') iv = os.environ.get('IV', 'fedcba9876543210') cipher = Cipher(b'aes', key=bytes.fromhex(key), iv=bytes.fromhex(iv)) plaintext = b'secret message' ciphertext = cipher.encrypt(plaintext) print(ciphertext.hex())
Debug
Known issues
breakingVersion 0.0.10 changed the return type of Cipher.encrypt from bytes to Ciphertext object. Access bytes via .data property.
fix
Use ciphertext.data instead of treating ciphertext as bytes.
affects: >=0.0.10
gotchaMany examples use from unicrypto.symmetric import AES which is incorrect; AES is accessed via Cipher with algorithm string 'aes'.
fix
Use from unicrypto import Cipher; cipher = Cipher('aes', ...)
affects: all
deprecatedThe PKCS7 padding class is deprecated in favor of integrated padding in Cipher mode.
fix
Use Cipher with padding parameter or rely on default padding.
affects: >=0.0.11
Upgrade
Version history
0.0.12latest on PyPI · released Oct 29, 2025
Audit
Dependencies
cryptographyrequiredPrimary backend for RSA, AES, etc.
pycryptodomeoptionalAlternative backend for some ciphers
Agent activity
36 hits · last 30 days
node
32
OpenAI (training)
1
Resources
unicrypto — pip install unicrypto · libregistry