MCPcopy Create free account
hub / github.com/HexHive/NASS / xor

Function xor

tools/gef.py:3485–3488  ·  view source on GitHub ↗

Return `data` xor-ed with `key`.

(data: ByteString, key: str)

Source from the content-addressed store, hash-verified

3483
3484
3485def xor(data: ByteString, key: str) -> bytearray:
3486 """Return `data` xor-ed with `key`."""
3487 key_raw = binascii.unhexlify(key.lstrip("0x"))
3488 return bytearray(x ^ y for x, y in zip(data, itertools.cycle(key_raw)))
3489
3490
3491def is_hex(pattern: str) -> bool:

Callers 2

do_invokeMethod · 0.85
do_invokeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected