- Timestamp:
- 07/09/13 11:17:19 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/bletchley/CBC/__init__.py
r48 r52 3 3 4 4 Copyright (C) 2010 ELOI SANFÈLIX 5 Copyright (C) 2012 Timothy D. Morgan5 Copyright (C) 2012-2013 Timothy D. Morgan 6 6 @author: Eloi Sanfelix < eloi AT limited-entropy.com > 7 7 @author: Timothy D. Morgan < tmorgan {a} vsecurity . com > … … 223 223 suffix = struct.pack("B"*len(suffix),*suffix)+block 224 224 225 225 # XXX: catch any signal exceptions, such as ^C, and communicate 226 # this back to the rest of the script so it can end immediately 226 227 for x in range(0, 1+self.retries): 227 228 # Each thread spawned searches a subset of the next byte's … … 284 285 if pad_bytes == None: 285 286 # XXX: custom exception 287 self.log_message("Could not determine pad length") 286 288 raise Exception 287 289 … … 314 316 315 317 # Finally decrypt first block 316 decrypted = self.decrypt_block(self._iv, blocks[0], partial) + decrypted 318 if finished_blocks < len(blocks): 319 decrypted = self.decrypt_block(self._iv, blocks[0], partial) + decrypted 317 320 318 321 # Remove the padding and return
Note: See TracChangeset
for help on using the changeset viewer.