SimpleAES is an AES-256 encryption and decryption in Python library.
AES is a symmetric encryption algorithm, meaning you use the same key to encrypt and decrypt the data later on.
Here's how simple it is:
>>> from SimpleAES import SimpleAES
>>> key = 'Some arbitrary bytestring.' # Store this somewhere safe
>>> aes = SimpleAES(key)
>>> ciphertext = aes.encrypt('My secret plaintext data')
>>> plaintext = aes.decrypt(ciphertext)
'My secret plaintext data'
You can use arbitrarily long keys. Use a good random generator to generate one and store it safe. (For the technically inclined: a 256-bit hash is calculated from the input key and forms the actual encryption key.)
AES has a fixed block length (128 bits) and supports variable key sizes, but this library always uses AES-256, meaning 256-bit key sizes.
Only every use this library for encrypting/decrypting relatively small pieces of text (compared to available memory, that is). It holds both the input and output strings in memory for the full length of the algorithm, so memory peaks may be an issue when used on large input strings.
The usual stuff.
pip install SimpleAES