Abstract: A method for clearing unlocking key codes in an electronic locking device in which the unlocking circuit is arranged to be actuated when the code of a magnetic card read by the card reader agrees with an unlocking key code set in the memory, the method comprising using a first clearing card which will function only when the door associated with the locking device is open and a second clearing card which will function only when the door is closed, setting the codes of the first and second clearing cards in specified separate addresses in the memory in the code setting mode for setting the codes of the clearing cards in the processing unit (CPU) of the electronic locking device, determining whether the door is open or closed in the normal operation mode of the CPU, and clearing the unlocking key codes only when the code read by the card reader is identical to the code of the first clearing card set in the above-mentioned manner and the door is open, or when the code read by the card reader is identical to the c
Abstract: An electronic locking device which is particularly useful for safes in a hotel room comprises an unlocking circuit actuated when a code on a magnetic card which acts as the "key" is read by a card reader forming part of the device agrees with an unlocking code stored in the memory of the device. The unlocking code from the card is set in memory when the memory is enabled and the magnetic card is loaded into the card reader for a plurality of times within a relatively short pre-selected time interval.