A locking device operated by an electric circuit. Techniques include using an electromagnet to hold a door closed or a solenoid to move a locking bar. Many electronic locks can be operated without a physical key, by entering a code into a keypad; they can also be attached to a computer with software that controls access and keeps records of who has opened the door.