parse buffer as header if passed as arg to next()
authorPhilipp Gesang <philipp.gesang@intra2net.com>
Thu, 6 Apr 2017 14:54:33 +0000 (16:54 +0200)
committerPhilipp Gesang <philipp.gesang@intra2net.com>
Mon, 7 Aug 2017 12:02:44 +0000 (14:02 +0200)
deltatar/crypto.py

index e6374ad..0226a48 100755 (executable)
@@ -531,6 +531,8 @@ class Decrypt (Crypto):
 
 
     def next (self, hdr):
+        if isinstance (hdr, bytes) is True:
+            hdr = hdr_read (hdr)
         paramversion = hdr ["paramversion"]
         if self.key is None:
             super().next (self.password, paramversion, hdr ["nacl"])