We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b9747f7 commit c6d5696Copy full SHA for c6d5696
kaitaistruct.py
@@ -348,6 +348,8 @@ def process_xor_one(data, key):
348
def process_xor_many(data, key):
349
if key == b'\x00' * len(key):
350
return data
351
+ if len(key) == 1:
352
+ return KaitaiStream.process_xor_one(data, ord(key))
353
354
if PY2:
355
return bytes(bytearray(a ^ b for a, b in zip(bytearray(data), itertools.cycle(bytearray(key)))))
0 commit comments