Methods of securing the erasing and/or programming or reprogramming of data
and/or programs in a memory of a computer, in particular a control unit in a motor
vehicle, are described. In programming, either an identifier that identifies correct
erasing and/or programming of memory is entered into an area of memory that is
to be erased and/or programmed or it is selected from the data and/or programs
already entered, in particular from a program identifier in the form of a section
from it. In addition, the identifier is altered in memory before erasing and/or
programming the data and/or programs, in particular by erasing and/or programming,
so that the respective memory contents are not used in the event of an interruption
in the programming operation and thus in the event of defective programming.