From: SourceForge.net <no...@so...> - 2007-11-20 21:35:10
|
Bugs item #1835426, was opened at 2007-11-20 13:35 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=120937&aid=1835426&group_id=20937 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Unable to create new AES cipher with 32-byte IV Initial Comment: class MyCipher: def __init__(self): self.key = '01234567890123456789012345678901' self.iv = '01234567890123456789012345678901' self.cipher = AES.new(self.key, AES.MODE_CBC, self.iv) def encrypt(self,id): return cipher.encrypt(id) cipher = MyCipher() cipher.encrypt('foo'); Gives me the error: ValueError: IV must be 16 bytes long ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=120937&aid=1835426&group_id=20937 |