1. Technical Field
The present disclosure relates to an electronic device with a file locking function and a method thereof.
2. Description of Related Art
A file may be locked by: generating a dialog box to prompt user to input password in response to an file locking operation, and locking the file according to the input password. If the password is a combination of characters, it is easily unlocked if a simple password is set. If the password is complex, the password is difficult to remember.
The components of the drawings are not necessarily drawn to scale, the emphasis instead being placed upon clearly illustrating the principles of the present disclosure. Moreover, in the drawings, like reference numerals designate corresponding parts throughout several views.
In step S22, the processing unit 14 records an image file drawn by the drawing tool as a locking password following a drawing operation on the drawing interface 30. In the embodiment, the processing unit 14 identifies a trace of the drawing operation on the drawing interface 30, and regards the trace as the locking password, and stores the locking password in the data storage 11. In the embodiment, the locking password is rectangular.
In step S23, the processing unit 14 associates the locking password with the file to lock the file.
In step S41, the processing unit 14 selects a file in response to a file selection input.
In step S42, the processing unit 14 determines whether the file is associated with an image file, if the file is not associated with any image file, the procedure goes to step S46.
In step S43, if the file is associated with an image file, the processing unit 14 activates the drawing tool to display the drawing interface 30 (see
In step S44, the processing unit 14 records an image file drawn by the drawing tool as a unlocking password following a drawing operation on the drawing interface 30.
In step S45, the processing unit 14 determines whether the unlocking password 32 substantially matches the locking password 31 of the file.
In step S46, the processing unit 14 opens the file if the unlocking password 32 matches the locking password 31 of the file.
In step S47, the processing unit 14 generates a message if the unlocking password 32 does not match the locking password 31 of the file, such as a dialog box warning that the password is not correct.
In step S61, the processing unit 14 displays the drawing interface 30 on the display unit 12 in response to a file opening operation.
In step S62, the processing unit 14 records an image file drawn by the drawing tool as a unlocking password following a drawing operation on the drawing interface 30.
In step S63, the processing unit 14 compares the unlocking password 32 with the locking passwords 31 stored in the data storage 11 and determine whether it matches with one of the locking passwords?
In step S64, the processing unit 14 opens the file associated with the matched locking password of the unlocking password 32 if the matched locking password 32 of the unlocking password 32 exists.
In step S65, the processing unit 14 generates a message to inform that there is no file associated with the unlocking password 32 if no match is found.
In the embodiment, the match of the unlocking password 32 and the locking password 31 is determined by computing similarity between the unlocking password 32 and the locking password 31. If the similarity between the unlocking password 32 and the locking password 31 is a predetermined value, it can be determined that the unlocking password 32 substantially matches the locking password 31 if the similarity reaches or exceeds the predetermined value. The method for computing similarity between two image files is a familiar technology to the skilled persons in the art, so it's unnecessary to describe it here.
Although, the present disclosure has been specifically described on the basis of preferred embodiments, the disclosure is not to be construed as being limited thereto. Various changes or modifications may be made to the embodiment without departing from the scope and spirit of the disclosure.
| Number | Date | Country | Kind |
|---|---|---|---|
| 201110408541.4 | Dec 2011 | CN | national |