aesio

AES encryption routines

The AES module contains classes used to implement encryption and decryption. It aims to be low overhead in terms of memory.

class aesio.AES(key, mode=0, iv=None, segment_size=8)

Encrypt and decrypt AES streams

encrypt_into(src, dest)

Encrypt the buffer from src into dest.

For ECB mode, the buffers must be 16 bytes long. For CBC mode, the buffers must be a multiple of 16 bytes, and must be equal length. For CTX mode, there are no restrictions.

decrypt_into(src, dest)

Decrypt the buffer from src into dest. For ECB mode, the buffers must be 16 bytes long. For CBC mode, the buffers must be a multiple of 16 bytes, and must be equal length. For CTX mode, there are no restrictions.