from operator import xor


def fixed_xor(buffer1, buffer2):
    """'buffer1' and 'buffer2' must be of the same length.
    Return the a bytes string resulted from buffer1 xored buffer2.

    :param buffer1: bytes
    :param buffer2: bytes
    :return: bytes
    """
    if type(buffer1) is not bytes or type(buffer2) is not bytes:
        raise ValueError("Wrong type input: use bytes string.")

    if len(buffer1) != len(buffer2):
        raise ValueError("Undefined for sequences of unequal length")

    return b''.join([xor(b1, b2) for b1, b2 in zip(buffer1, buffer2)])