Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/Crypto/Cipher/_mode_ccm.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ def encrypt(self, plaintext, output=None):
# No more associated data allowed from now
if self._assoc_len is None:
assert(isinstance(self._cache, list))
self._assoc_len = sum([len(x) for x in self._cache])
self._assoc_len = sum(len(x) for x in self._cache)
if self._msg_len is not None:
self._start_mac()
else:
Expand Down Expand Up @@ -432,7 +432,7 @@ def decrypt(self, ciphertext, output=None):
# No more associated data allowed from now
if self._assoc_len is None:
assert(isinstance(self._cache, list))
self._assoc_len = sum([len(x) for x in self._cache])
self._assoc_len = sum(len(x) for x in self._cache)
if self._msg_len is not None:
self._start_mac()
else:
Expand Down Expand Up @@ -494,7 +494,7 @@ def _digest(self):

if self._assoc_len is None:
assert(isinstance(self._cache, list))
self._assoc_len = sum([len(x) for x in self._cache])
self._assoc_len = sum(len(x) for x in self._cache)
if self._msg_len is not None:
self._start_mac()
else:
Expand Down
Loading