def xor(bytes1: bytes, bytes2: bytes) -> bytes:
    """Support function to perform Exclusive-OR operation on two bytes.

    :param bytes1: set of bytes 1
    :param bytes2: set of bytes 2

    :returns: XORed data
    """
    if len(bytes1) == len(bytes2):
        return bytes(a ^ b for a, b in zip(bytes1, bytes2))
    raise ValueError("Input values must have same length")