pycrypto 2.6.1 : Python Package Index
An example usage of an encryption algorithm (AES, in this case) is:
>>> from Crypto.Cipher import AES >>> obj = AES.new('This is a key123', AES.MODE_CBC, 'This is an IV456') >>> message = "The answer is no" >>> ciphertext = obj.encrypt(message) >>> ciphertext 'xd6x83x8dd!VTx92xaa`Ax05xe0x9bx8bxf1' >>> obj2 = AES.new('This is a key123', AES.MODE_CBC, 'This is an IV456') >>> obj2.decrypt(ciphertext) 'The answer is no'