I have a working test of a hardware device that uses RSA encryption, in Python using M2Crypto. Now I need to test a similar device that uses 3DES encryption. But I can't figure out how to use M2Crypto to do triple DES encryption.

I know it should be possible from [this chart](http://mikeivanov.com/pc/python-crypto.pdf). But unfortunately [the documentation of M2Crypto](http://www.heikkitoivonen.net/m2crypto/api/) I've found is sketchy. (The [homepage](http://chandlerproject.org/Projects/MeTooCrypto) at <http://chandlerproject.org/> seems to be gone, along with Chandler.)

I've searched for 3DES and "OpenSSL API" and found some hard to grok C code for decrypting which makes it look like I need to use M2Crypto.EVP.Cipher. But I haven't found any examples of using it for DES. The closest I've found is [this blog post on using it for AES encryption](http://passingcuriosity.com/2009/aes-encryption-in-python-with-m2crypto/). It looks like I just need to figure out the correct arguments to `M2Crypto.EVP.Cipher.__init__()`. I'll keep digging, but I thought it worth posting this question.