M2Crypto Encrypt/Decrypt using AES256

mike picture mike · May 12, 2009 · Viewed 10.2k times · Source

Can someone provide me code to encrypt / decrypt using m2crypto aes256 CBC using Python

Answer

joeforker picture joeforker · May 12, 2009

M2Crypto's documentation is terrible. Sometimes the OpenSSL documentation (m2crypto wraps OpenSSL) can help. Your best bet is to look at the M2Crypto unit tests -- https://gitlab.com/m2crypto/m2crypto/blob/master/tests/test_evp.py -- look for the test_AES() method.