From 86061e595ce209dc90b44023456922c0fd1724fd Mon Sep 17 00:00:00 2001 From: r4sas Date: Thu, 4 Jun 2020 15:31:36 +0000 Subject: [PATCH] do not calculate tag size twice Signed-off-by: r4sas --- pbincli/format.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pbincli/format.py b/pbincli/format.py index a16bd2a..e46ed53 100644 --- a/pbincli/format.py +++ b/pbincli/format.py @@ -206,7 +206,7 @@ class Paste: # Get compression type from received paste self._compression = self._data['adata'][0][7] - cipher = self.__initializeCipher(key, iv, self._data['adata'], int(self._tag_bits /8 )) + cipher = self.__initializeCipher(key, iv, self._data['adata'], cipher_tag_bytes) # Cut the cipher text into message and tag cipher_text_tag = b64decode(self._data['ct']) cipher_text = cipher_text_tag[:-cipher_tag_bytes]