Comment 8 for bug 1004845

Revision history for this message
Darsey Litzenberger (dlitz) wrote :

Launchpad mangled my example code. Here it is again:

>>> def enc(password):
... return AES.new("0123456789abcdef", AES.MODE_CFB, "\0"*16) \
... .encrypt(password).encode('hex')
...
>>> enc("a")
'6a'
>>> enc("ab")
'6af9'
>>> enc("abc")
'6af9bb'
>>> enc("abc0")
'6af9bb62'
>>> enc("abc1")
'6af9bb63'
>>> enc("abc2")
'6af9bb60'
>>> enc("abc3")
'6af9bb61'
>>> enc("abc4")
'6af9bb66'