From 4e432e49dca9e44a8eec753013e231ea63e66de8 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Thu, 6 Apr 2017 16:54:33 +0200 Subject: [PATCH] parse buffer as header if passed as arg to next() --- deltatar/crypto.py | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/deltatar/crypto.py b/deltatar/crypto.py index e6374ad..0226a48 100755 --- a/deltatar/crypto.py +++ b/deltatar/crypto.py @@ -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"]) -- 1.7.1