'do == 1 => Encrypt; do == 0 => Decrypt'

def __init__(self, key, iv, do, ciphername='aes-256-cbc'):

    self.cipher = OpenSSL.get_cipher(ciphername)
    self.ctx = OpenSSL.EVP_CIPHER_CTX_new()
    if ((do == 1) or (do == 0)):
        k = OpenSSL.malloc(key, len(key))
        IV = OpenSSL.malloc(iv, len(iv))
        OpenSSL.EVP_CipherInit_ex(self.ctx, self.cipher.get_pointer(), 0, k, IV, do)
    else:
        raise Exception('RTFM    ...')
