We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b474262 commit ff57c98Copy full SHA for ff57c98
refinery/units/crypto/cipher/__init__.py
@@ -274,6 +274,11 @@ def decrypt(self, data: Chunk) -> buf:
274
self.log_warn(F'removing {overlap} bytes from the input to make it a multiple of the {self.block_size}-byte block size')
275
return self._get_cipher(True).decrypt(data)
276
277
+ @classmethod
278
+ def handles(cls, data) -> bool | None:
279
+ if len(data) % cls.block_size == 0:
280
+ return True
281
+
282
283
class StandardBlockCipherUnit(BlockCipherUnitBase, StandardCipherUnit):
284
0 commit comments