Fixing AESCrypt stupid bug
authorDaniel Garcia Moreno <danigm@wadobo.com>
Thu, 1 Aug 2013 08:58:23 +0000 (10:58 +0200)
committerDaniel Garcia Moreno <danigm@wadobo.com>
Thu, 1 Aug 2013 08:58:23 +0000 (10:58 +0200)
deltatar/aescrypto.py

index 81ac1e5..4e2f4e3 100644 (file)
@@ -86,8 +86,9 @@ class AESCrypt:
 
         self.buf += chunk
         if len(self.buf) % self.bs == 0:
+            cipher = self.cipher.encrypt(self.buf)
             self.buf = ''
-            return self.cipher.encrypt(self.buf)
+            return cipher
 
         cipher = ''
         while len(self.buf) >= self.bs: