Registry / auth-security / simple-crypt

simple-crypt

JSON →
library4.1.7pypypiunverified

Simple, secure encryption and decryption for Python 2.7 and 3. Current version 4.1.7. Provides high-level functions `encrypt` and `decrypt` using PBKDF2 and AES-256-CBC. Release cadence is low (last release 2018).

pip install simple-crypt
INSTALL
IMPORT
SIG · SIMPLE-CRYPT
S
simple-crypt
auth-securitypythonv4.1.7
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

encrypt
from simplecrypt import encrypt
from simplecrypt import encrypt
decrypt
from simplecrypt import decrypt
from simplecrypt import decrypt

Encrypt and decrypt using a password string. Data must be bytes-like.

from simplecrypt import encrypt, decrypt # Encrypt password = 'my-secret-password' plaintext = b'Hello, this is secret data' ciphertext = encrypt(password, plaintext) print(ciphertext) # Decrypt plaintext_back = decrypt(password, ciphertext) print(plaintext_back) # Note: password must be a string, data must be bytes-like.
Debug
Known issues
breakingIn Python 3, password must be a string (not bytes). Passing bytes as password raises TypeError.
fix
Always use str for password: encrypt('password', data) not encrypt(b'password', data).
affects: >=4.0
breakingLibrary has known issues with pycryptodome versions >3.9.9. Installation may conflict with newer pycryptodome releases.
fix
Pin pycryptodome to 3.9.9: pip install 'pycryptodome==3.9.9'
affects: >=4.1
Upgrade
Version history
4.1.7latest on PyPI · released Jun 16, 2015
Audit
Dependencies
pycryptodomerequiredsimple-crypt depends on pycryptodome for cryptographic primitives.
Agent activity
30 hits · last 30 days
node
18
OpenAI (training)
1
Resources