From 8390c925d5069d933ec3081a85b028dfc619ed7a Mon Sep 17 00:00:00 2001 From: Daniel Garcia Moreno Date: Wed, 31 Jul 2013 14:07:18 +0200 Subject: [PATCH] Removing OFB pad to avoid to hide errors --- deltatar/aescrypto.py | 4 ++-- testing/test_deltatar.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/deltatar/aescrypto.py b/deltatar/aescrypto.py index 5ae2b06..81ac1e5 100644 --- a/deltatar/aescrypto.py +++ b/deltatar/aescrypto.py @@ -108,8 +108,8 @@ class AESCrypt: bs = self.bs # Adding pad, only needed when there's no pad, when using OFB - if len(buf) % bs != 0: - buf += self.get_pad(bs - len(buf) % bs) + #if len(buf) % bs != 0: + # buf += self.get_pad(bs - len(buf) % bs) chunk = self.cipher.decrypt(buf) if end: diff --git a/testing/test_deltatar.py b/testing/test_deltatar.py index 3dbf9a2..27b2388 100644 --- a/testing/test_deltatar.py +++ b/testing/test_deltatar.py @@ -274,7 +274,7 @@ class DeltaTarTest(BaseTest): deltatar.create_full_backup( source_path="source_dir", backup_path="backup_dir", - max_volume_size=1) + max_volume_size=2) shutil.rmtree("source_dir") -- 1.7.1