Python AES Module

Installation

Download:

wget http://www.louko.com/alo-aes/alo-aes-0.3.tar.gz

Decompress:

gunzip alo-aes-0.3.tar.gz
tar -xf alo-aes-0.3.tar

Installation:

cd alo-aes-0.3
python setup.py install

Using

In Python:

Import module:

import aes

Cypher inicialization:

password = "abcdefghijklmnop"
cipher = aes.Keysetup(password)
  • Length of key 1) must have 16, 24 or 32 characters.

Encryption:

plaintext = "hello           "
ciphertext = cipher.encrypt(plaintext)
  • Length of plaintext must have 16, 24 or 32 characters.
  • You can use cbcencrypt function instead of encrypt.

Decryption:

plaintext = cipher.decrypt(ciphertext)

* You can use cbcdecrypt function instead of decrypt.

Enjoy …

…matus…

1) password
 
python_aes_module.txt · Last modified: 31.03.2010 17:51 (external edit)
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki