- Timestamp:
- 02/13/13 19:59:42 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/bletchley/CBC/__init__.py
r36 r37 270 270 271 271 # Start where we left off last 272 # XXX: test this 272 # XXX: test this more 273 273 else: 274 274 num_partial = len(self.decrypted) % self.block_size … … 277 277 decrypted = self.decrypted[num_partial:] 278 278 279 for i in range( -1-finished_blocks, 0, -1):280 decrypted = self.decrypt_block(blocks[i-1], blocks[i], partial) 279 for i in range(len(blocks)-1-finished_blocks, 0, -1): 280 decrypted = self.decrypt_block(blocks[i-1], blocks[i], partial) + decrypted 281 281 partial = '' 282 282 283 283 # Finally decrypt first block 284 284 decrypted = self.decrypt_block(self._iv, blocks[0]) + decrypted
Note: See TracChangeset
for help on using the changeset viewer.