def chunk(input_data, size):
    """
    Chunk given bytes into parts
    :param input_data: bytes to split
    :param size: size of a single chunk
    :return: list of chunks
    """
    assert len(input_data) % size == 0, \
        "can't split data into chunks of equal size, try using chunk_with_remainder or pad data"
    return [input_data[i:i + size] for i in range(0, len(input_data), size)]