{"id":27396,"library":"simple-crypt","title":"simple-crypt","description":"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).","status":"maintenance","version":"4.1.7","language":"python","source_language":"en","source_url":"https://github.com/andrewcooke/simple-crypt","tags":["encryption","security","simple","aes","pbkdf2"],"install":[{"cmd":"pip install simple-crypt","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"simple-crypt depends on pycryptodome for cryptographic primitives.","package":"pycryptodome","optional":false}],"imports":[{"note":"Module name is 'simplecrypt', not 'simple_crypt'.","wrong":"from simple_crypt import encrypt","symbol":"encrypt","correct":"from simplecrypt import encrypt"},{"note":"","wrong":"","symbol":"decrypt","correct":"from simplecrypt import decrypt"}],"quickstart":{"code":"from simplecrypt import encrypt, decrypt\n\n# Encrypt\npassword = 'my-secret-password'\nplaintext = b'Hello, this is secret data'\nciphertext = encrypt(password, plaintext)\nprint(ciphertext)\n\n# Decrypt\nplaintext_back = decrypt(password, ciphertext)\nprint(plaintext_back)\n\n# Note: password must be a string, data must be bytes-like.","lang":"python","description":"Encrypt and decrypt using a password string. Data must be bytes-like."},"warnings":[{"fix":"Always use str for password: encrypt('password', data) not encrypt(b'password', data).","message":"In Python 3, password must be a string (not bytes). Passing bytes as password raises TypeError.","severity":"breaking","affected_versions":">=4.0"},{"fix":"Pin pycryptodome to 3.9.9: pip install 'pycryptodome==3.9.9'","message":"Library has known issues with pycryptodome versions >3.9.9. Installation may conflict with newer pycryptodome releases.","severity":"breaking","affected_versions":">=4.1"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Use password = 'my-password' (str) instead of b'my-password'.","cause":"Passing bytes as password in Python 3. The library strictly requires str.","error":"TypeError: password must be a string, not bytes"},{"fix":"Install pycryptodome: pip install pycryptodome. For compatibility issues, pin version: pip install 'pycryptodome==3.9.9'","cause":"Missing or incompatible pycryptodome installation.","error":"ImportError: No module named 'Crypto'"},{"fix":"Ensure the password is correct and the ciphertext has not been altered.","cause":"Decryption with wrong password or corrupted ciphertext.","error":"ValueError: PEM encryption failed"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}