A kind of implementation method of secret picture and system thereof
Technical field
The present invention relates to mobile terminal picture encryption technology field, particularly relate to a kind of implementation method and system thereof of secret picture.
Background technology
Under normal circumstances, the figure sector-meeting that Android platform stores is retrieved multimedia database automatically by system, and show in system picture library, other third-party application stating picture library reading authority also can read and show the picture of picture library, but some secret pictures are not encrypted temporarily now, to ensure secret picture not by the method for system retrieval with other analytic applications, the individual demand of user can not be met.
Summary of the invention
For the deficiencies in the prior art, the object of the present invention is to provide a kind of implementation method meeting the secret picture of users ' individualized requirement.
Another object of the present invention is to provide a kind of system realizing secret picture.
For achieving the above object, the technical solution used in the present invention is as follows: a kind of implementation method of secret picture, said method comprising the steps of:
To needing the picture file encrypted to be encrypted in picture library, inserting default noise data in picture file, picture file cannot being normally resolved, to realize the encryption of picture file;
The position that the picture file noise data of encryption is inserted and length are saved in the private data storehouse of specifying, and delete the former picture file data in figure library database;
Process is decrypted to the picture file of encryption, according to position and the length of the picture file noise data preserved in private data storehouse, remove noise data, and recover picture file data and normally resolve display to figure library database, to realize the deciphering of picture file.
Further, described method also comprises:
Picture file decryption verification code is set, after the identifying code of user's input adaptation, automatically process is decrypted to the picture file encrypted.
Preferably, described method also comprises:
Described identifying code saves as MD5 value, and the identifying code that user inputs is converted to MD5 value, and contrasts with the MD5 value of decryption verification code, if identical, successful decryption, if not identical, deciphers unsuccessful.
For realizing another object of the present invention, the present invention also adopts following technical scheme: a kind of system realizing secret picture, and described system comprises:
Ciphering unit, to needing the picture file encrypted to be encrypted in picture library, inserting default noise data in picture file, picture file cannot being normally resolved, to realize the encryption of picture file;
Storage unit, the position that the picture file noise data of encryption is inserted and length are saved in the private data storehouse of specifying, and delete the former picture file data in figure library database;
Decryption unit, process is decrypted to the picture file of encryption, according to position and the length of the picture file noise data preserved in private data storehouse, removes noise data, and recover picture file data and normally resolve display to figure library database, to realize the deciphering of picture file.
Further, described system also comprises:
Authentication unit, arranges picture file decryption verification code, after the identifying code of user's input adaptation, is automatically decrypted process to the picture file encrypted.
Preferably, identifying code is saved as MD5 value by described authentication unit, and the identifying code that user inputs is converted to MD5 value, and contrasts with the MD5 value of decryption verification code, if identical, successful decryption, if not identical, deciphers unsuccessful.
Relative to prior art, technical solutions according to the invention, by needing the picture file encrypted to be encrypted in picture library, being inserted default noise data in picture file, picture file cannot being normally resolved, to realize the encryption of picture file; The position that the picture file noise data of encryption is inserted and length are saved in the private data storehouse of specifying, and delete the former picture file data in figure library database; Process is decrypted to the picture file of encryption, according to position and the length of the picture file noise data preserved in private data storehouse, remove noise data, and recover picture file data and normally resolve display to figure library database, to realize the deciphering of picture file, meet the individual demand of user.
In order to understand object of the present invention, characteristic sum effect fully, be described further below with reference to the technique effect of accompanying drawing to design of the present invention, concrete structure and generation.
Accompanying drawing explanation
Fig. 1 is the module diagram that the present invention realizes the system of secret picture;
Fig. 2 is the implementation method process flow diagram of secret picture of the present invention.
Embodiment
Describe the present invention in detail below in conjunction with accompanying drawing and specific implementation method, be used for explaining the present invention in exemplary embodiment and description of the present invention, but not as a limitation of the invention.
Embodiment one
As shown in Figure 1, a kind of system realizing secret picture, described system comprises:
Ciphering unit, to needing the picture file encrypted to be encrypted in picture library, inserting default noise data in picture file, picture file cannot being normally resolved, to realize the encryption of picture file;
Storage unit, the position that the picture file noise data of encryption is inserted and length are saved in the private data storehouse of specifying, and delete the former picture file data in figure library database;
Authentication unit, arranges picture file decryption verification code, after the identifying code of user's input adaptation, is automatically decrypted process to the picture file encrypted; Identifying code is saved as MD5 value by described authentication unit, and the identifying code that user inputs is converted to MD5 value, and contrasts with the MD5 value of decryption verification code, if identical, successful decryption, if not identical, deciphers unsuccessful.Allow user that the password of six bit digital is set, the MD5 value that preservation generates with password.During authentication password, whether the MD5 value that contrast password generates is identical, and identical then password is correct.
Decryption unit, process is decrypted to the picture file of encryption, according to position and the length of the picture file noise data preserved in private data storehouse, removes noise data, and recover picture file data and normally resolve display to figure library database, to realize the deciphering of picture file.
As shown in Figure 2, a kind of implementation method of secret picture, said method comprising the steps of:
S101: to needing the picture file encrypted to be encrypted in picture library, inserting default noise data in picture file, picture file cannot being normally resolved, to realize the encryption of picture file;
S102: the position that the picture file noise data of encryption is inserted and length are saved in the private data storehouse of specifying, and delete the former picture file data in figure library database;
S103: arrange picture file decryption verification code, after the identifying code of user's input adaptation, is decrypted process to the picture file encrypted automatically;
Identifying code saves as MD5 value, and the identifying code that user inputs is converted to MD5 value, and contrasts with the MD5 value of decryption verification code, if identical, successful decryption, if not identical, deciphers unsuccessful.
S104: process is decrypted to the picture file of encryption, according to position and the length of the picture file noise data preserved in private data storehouse, remove noise data, and recover picture file data and normally resolve display to figure library database, to realize the deciphering of picture file.
Technical solutions according to the invention, by needing the picture file encrypted to be encrypted in picture library, being inserted default noise data in picture file, picture file cannot being normally resolved, to realize the encryption of picture file; The position that the picture file noise data of encryption is inserted and length are saved in the private data storehouse of specifying, and delete the former picture file data in figure library database; Process is decrypted to the picture file of encryption, according to position and the length of the picture file noise data preserved in private data storehouse, remove noise data, and recover picture file data and normally resolve display to figure library database, to realize the deciphering of picture file, ensure secret picture not by system retrieval and other analytic applications, user, by just browsing and shift out secret picture after password authentification, meets the individual demand of user.
More than describe preferred embodiment of the present invention in detail, should be appreciated that the ordinary skill of this area just design according to the present invention can make many modifications and variations without the need to creative work.Therefore, all technician in the art according to the present invention's design on prior art basis by logic analysis, reasoning or according to the available technical scheme of limited experiment, all should by among the determined protection domain of these claims.