1. A method for operating an electronic device, wherein in a normal operation state of the electronic device, data stored in a main storage device of the electronic device is encrypted by a first encryption algorithm prior to being stored in a non-volatile storage device of the electronic device, the method comprising: generating snapshot data in the main storage device when the electronic device is entering a hibernation state; allocating a space in the non-volatile storage device for storing the snapshot data; and storing the snapshot data in the space without encrypting the snapshot data using the first encryption algorithm.