The example here shows how to encrypt and decrypt data using python in a way that is fully compatible with openssl aes-256-cbc. It is based on the work that I did in C++ Cipher class that is published on this site. It works for both python-2.7 and python-3.x.
The key idea is based on the way that openssl generates the key and iv data from password as well as the “Salted__” prefix that it uses.
The complete routine can be downloaded here: mycrypt.py.
Continue reading Simple python functions that provide openssl -aes-256-cbc compatible encrypt/decrypt