python: how to encrypt a file?

andriyko picture andriyko · Feb 8, 2011 · Viewed 8.5k times · Source

Can anybody help(or point to some examples) about how to encrypt files with python? I have to use following parameters to encrypt file:

block size=8
iv=qwertyui12345678
method=des3_cbc

Also I have no idea about what iv means

Please help. Thanks in advance.

Answer

Michael Dillon picture Michael Dillon · Feb 8, 2011

You will need to use the Python Crypto Toolkit

IV is the Initialisation Vector.