CN100462995C - Checking of image document and method for using same - Google Patents

Checking of image document and method for using same Download PDF

Info

Publication number
CN100462995C
CN100462995C CNB200510120652XA CN200510120652A CN100462995C CN 100462995 C CN100462995 C CN 100462995C CN B200510120652X A CNB200510120652X A CN B200510120652XA CN 200510120652 A CN200510120652 A CN 200510120652A CN 100462995 C CN100462995 C CN 100462995C
Authority
CN
China
Prior art keywords
image file
eigenwert
file
hash value
checking
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CNB200510120652XA
Other languages
Chinese (zh)
Other versions
CN1979516A (en
Inventor
杨晓虎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CNB200510120652XA priority Critical patent/CN100462995C/en
Priority to PCT/CN2006/002940 priority patent/WO2007065341A1/en
Publication of CN1979516A publication Critical patent/CN1979516A/en
Application granted granted Critical
Publication of CN100462995C publication Critical patent/CN100462995C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Abstract

The invention provides an image file using and verifying method, compressing image file into a file packet to be stored at client end, and the file packet includes a list of HASH values of all files in the image file; when verifying the image file, reading in the list of HASH values; drawing a record from the list; calculating the HASH value of an image file in the client end corresponding to the record; comparing whether the HASH value of the record is equal to the calculated HASH value of the current file. Thus, it can prevent image files being modified at will.

Description

A kind of checking of image file and using method
Technical field
The invention relates to image data processing technique, especially about a kind of checking and using method of image file, to prevent that image file from arbitrarily being changed.
Background technology
Along with society and development of science and technology, image processing techniques is more and more used in computer realm, and it is colorful to make that people's work, study and daily life become increasingly abundant.
In the prior art, adopt the mode of Flash animation to show some required actions usually, for example operate in the virtual pet recreation of user computer desktop.It specifically can adopt the mode of computer program to realize, the control of program by each Flash animation is play realizes the description to whole pet life life, experiences for vital virtual pet of user.After the Flash animation of pet is handled through transparence, may be displayed on any position of user's desktop.
In addition, in order to increase the personalised effects of virtual pet recreation, the player can buy corresponding image file (stage property), plays and decorates pet, the interest of adopting pet with increase as confession pets such as toy, bubble backgrounds.In the prior art, at first the user need use ideal money download images file, document image file is stored in client with GIF picture or alternative document form, the user clicks the image file that corresponding project can start client, pet is cooked played the action of ball or demonstrate more beautiful background etc.
The all images file all needs to download to client could be used, the user can arbitrarily change picture or alternative document in client like this, the poor effect that causes the personalization of pet to represent, and, also can damage virtual pet developer's interests not needing to enjoy multiple personalized service under the situation of using ideal money to buy.
Summary of the invention
Fundamental purpose of the present invention is to solve the problem that image file can arbitrarily be changed in the above-mentioned prior art, and a kind of method of using image file is provided.
For reaching above-mentioned fundamental purpose, the present invention is compressed into a literature kit with it during image file and is stored in client when downloading, include the eigenwert tabulation of All Files in this image file in this document bag, the step of use comprises as follows: whether client detected image file is downloaded; Then need this image file is verified if downloaded, image file is verified by the eigenwert tabulation; The image file checking is by then using this image file; If download images file is not again passed through then in checking.
Another fundamental purpose of the present invention provide a kind of when using image file the method for authentication image file.
For reaching above-mentioned another fundamental purpose, image file of the present invention is compressed into a literature kit and is stored in client, includes the eigenwert tabulation of All Files in this image file in this document bag; This verification method comprises the steps: to read in each eigenwert tabulation; From above-mentioned eigenwert tabulation, take out a record successively; Calculate in the active client image file eigenwert with the corresponding file of this record; Relatively whether this eigenwert of being put down in writing of record is identical with the eigenwert that is calculated by corresponding file.
Preferable, this eigenwert is the HASH value of coming out by the md5 encryption algorithm computation.Also comprise the step that the checking catalogue is set before reading in the eigenwert tabulation, will be decrypted the eigenwert tabulation then.Wherein said checking catalogue is the temp directory of client, stores the decompression catalogue of image file in this temp directory.
Preferable, also comprise before calculating in the client eigenwert with the corresponding file of this record: judge under the checking catalogue whether have this corresponding image file.
Preferable, described eigenwert is the HASH value, and this eigenwert tabulation comprises filename and HASH value, and is corresponding one by one between filename and the HASH value.
In sum, among the present invention when the client downloads image file, eigenwert tabulation with image file is compressed in the literature kit together, at every turn before using local image file, always utilize HASH value list and current All Files content to contrast one by one, in case find variantly, then supporting paper may be modified or replace, and will not re-use this this locality image file.Thereby prevent that effectively image file from arbitrarily being changed.
Description of drawings
Fig. 1 is the use synoptic diagram of image file of the present invention.
Fig. 2 uses the process flow diagram of image file for the present invention.
Fig. 3 is the process flow diagram of authentication image file of the present invention.
Fig. 4 is a wherein embodiment eigenwert tabulation synoptic diagram of the present invention.
Embodiment
In order to make purpose of the present invention, technical scheme and advantage clearer,, the present invention is further elaborated below in conjunction with drawings and Examples.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
In order to increase the personalised effects of virtual pet, the player can buy corresponding image file (stage property), plays and decorates pet as confession virtual pets such as toy, bubble backgrounds.As shown in Figure 1, a plurality of files have been generally comprised in the described image file, as image file 1, image file 2 etc., at first need to become a literature kit to download in the pet Resource TOC of client these a plurality of File Compress, include the eigenwert tabulation of each file in this image file in this document bag, decompress in client then, and with the decompression directory stores of each image file in the temp directory of client, explain by oneself when using image file in the compression catalogue and read related data.
Idiographic flow when below in conjunction with Fig. 2 client of the present invention being used image file is done an explanation:
Whether client at first detected image file downloads (step 10);
Then need this image file is verified (step 20) if downloaded;
Checking is by then using this image file (step 50);
If verify not by then arriving step 30, again the download images file;
If detecting image file does not download, then image file is compressed into a literature kit and downloads in the pet Resource TOC of client, and include the eigenwert tabulation (step 30) of each file in this image file in this document bag;
Decompressing image file then, and with the decompression directory stores of image file in the temp directory of client (step 40);
Can explain compression at last by oneself reads related data in the catalogue and can use image file (step 50).
This eigenwert tabulation is a HASH value list in the preferred embodiment of the present invention, each bar record of this HASH value list is equivalent to respectively take " snapshot " to a corresponding file under this image file, and it can note the original contents of this document image file.This HASH tabulation comprises filename and HASH value, corresponding one by one between filename and the HASH value, described HASH value utilizes the md5 encryption algorithm computation to come out, this md5 encryption algorithm algorithm can transform into the data computation of random length the serial data of a regular length, in case very little change takes place the content of file, the serial data that calculates then can change a lot.
Below in conjunction with explanation shown in Figure 3 performing step 20 how, image file is verified (as shown in Figure 3):
It is the temp directory (step 201) of client that the checking catalogue at first is set, because the temp directory of client stores the decompression catalogue of image file, promptly is to be provided with to verify the decompression catalogue of image file;
Tabulation is decrypted (step 202) to HASH;
If successful decryption reads in HASH value list (step 203);
Then from the HASH tabulation, take out a record (step 204);
Judge under the checking catalogue whether exist and the corresponding file of this record (step 205);
If exist, then utilize the MD5 algorithm computation to go out the current HASH value of this document, this md5 encryption algorithm algorithm can transform into the data computation of random length the serial data (step 205) of a regular length;
Judge whether the HASH value in the record equates (step 207) with the current HASH value that calculates this document;
If equate then to judge whether the record in the HASH tabulation all verifies (step 208);
Then checking is passed through if finish, and reaches step 50, can use image file;
If do not verify, then get back to step 204, continue to read next bar record.
In the above-mentioned steps process, if to not existing and the corresponding file of being verified of record under HASH tabulation deciphering failure or the checking catalogue, or two HASH values are unequal, then all can authentication failed, directly arrive step 30, this image file is downloaded in beginning again, and does not re-use the image file in the active client.
In order more clearly to describe the verification method of image file of the present invention, will be that example is described in more details with " personalized bubble background image file " in the virtual pet below.
A bubble background generally comprises " background gif file ", " button BMP file ", " configuration file " three files.For following carried convenient, become a ZIP literature kit to download in the pet Resource TOC of client three above-mentioned File Compress, these three files that decompress then, and with its decompression directory stores in the temp directory of client.And also comprising HASH tabulation in this ZIP literature kit, as shown in Figure 4, include three records in this HASH tabulation, is respectively background, button and configuration file, in each record to one 16 byte information strings (HASH value) should be arranged.
Client is before using image file, and it is the temp directory of client that the checking catalogue at first is set; Decrypt the HASH tabulation; From this tabulation, take out pairing record in this column of background then; Whether have with this in the decompression catalogue in the checking client system and write down corresponding file, be i.e. " background gif file "; If have, then utilize the MD5 algorithm computation to go out the HASH value of current " background gif file "; Judge then whether the HASH value in the tabulation is identical with the current HASH value that calculates; So analogize, the HASH value of all records is all identical with the current HASH value that calculates in the HASH tabulation, and then checking is passed through.If wherein there is a record not have checking to pass through, the bubble background that then is loaded in this client down can not be used again, needs download images file again.
To sum up state, client is before each use image file, all to utilize file contents all under the HASH value of encryption and the present image file to compare, in case find differences, illustrate that then this image file is replaced or changes, to not re-use current file so, but download this image file again.Thereby prevent that effectively image file from arbitrarily being changed.
The above only is preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of being done within the spirit and principles in the present invention, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.

Claims (14)

1. the verification method of an image file, be used for when client is used image file, image file being verified, this image file is compressed into a literature kit and is stored in client when downloading, it is characterized in that: include the eigenwert tabulation of All Files in this image file in this document bag, All Files in this image file is verified, if the checking to one of them file in this image file is not passed through, then the checking of this image file is not passed through; The method that All Files is verified comprises the steps:
Read in each eigenwert tabulation;
From above-mentioned eigenwert tabulation, take out a record;
Calculate in the active client image file eigenwert with the corresponding file of this record;
Relatively whether this eigenwert of being put down in writing of record is identical with the eigenwert that is calculated by corresponding file.
2. a kind of verification method of image file according to claim 1, it is characterized in that: described eigenwert is the HASH value.
3. as the verification method of a kind of image file as described in the claim 2, it is characterized in that: described eigenwert tabulation comprises filename and HASH value, and is corresponding one by one between filename and the HASH value.
4. as the verification method of a kind of image file as described in the claim 2, it is characterized in that: described HASH value utilizes the md5 encryption algorithm computation to come out, and needs the HASH value list is decrypted before reading in HASH value list step.
5. as the verification method of a kind of image file as described in the claim 4, it is characterized in that: before the HASH value list is decrypted, also comprise the step that the checking catalogue is set.
6. as the verification method of a kind of image file as described in the claim 5, it is characterized in that: described checking catalogue is the temp directory of client.
7. as the verification method of a kind of image file as described in the claim 5, it is characterized in that: in calculating client with before the step of the corresponding file characteristic value of this record, also comprise:
Judge under the checking catalogue and whether have this corresponding image file.
8. the using method of an image file, this image file is compressed into a literature kit and is stored in client when downloading, it is characterized in that: include the eigenwert tabulation of All Files in this image file in this document bag, and this using method comprises the steps:
Whether client detected image file is downloaded;
Then need this image file is verified if downloaded, the All Files of image file is verified,, then the checking of this image file is not passed through if the checking of one of them file in this image file is not passed through by the eigenwert tabulation;
The image file checking is by then using this image file;
If download images file is not again passed through then in checking;
Described image file is verified comprises the steps:
Read in each eigenwert tabulation;
From above-mentioned eigenwert tabulation, take out a record;
Calculate in the active client image file eigenwert with the corresponding file of this record;
Relatively whether this eigenwert of being put down in writing of record is identical with the eigenwert that calculates.
9. as the using method of a kind of image file as described in the claim 8, it is characterized in that: described eigenwert is the HASH value.
10. as the using method of a kind of image file as described in the claim 9, it is characterized in that: described eigenwert tabulation comprises filename and HASH value, and is corresponding one by one between filename and the HASH value.
11. as the using method of a kind of image file as described in the claim 9, it is characterized in that: described HASH value utilizes the md5 encryption algorithm computation to come out, and needs the HASH value list is decrypted before reading in HASH value list step.
12. the using method as a kind of image file as described in the claim 11 is characterized in that: before the HASH value list is decrypted, also comprise the step that the checking catalogue is set.
13. as the using method of a kind of image file as described in the claim 12, it is characterized in that: described checking catalogue is the temp directory of client.
14. the using method as a kind of image file as described in the claim 12 is characterized in that: in calculating client with before the step of the corresponding file characteristic value of this record, also comprise:
Judge under the checking catalogue and whether have this corresponding image file.
CNB200510120652XA 2005-12-10 2005-12-10 Checking of image document and method for using same Active CN100462995C (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CNB200510120652XA CN100462995C (en) 2005-12-10 2005-12-10 Checking of image document and method for using same
PCT/CN2006/002940 WO2007065341A1 (en) 2005-12-10 2006-11-02 A method and apparatus for verifying an image file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB200510120652XA CN100462995C (en) 2005-12-10 2005-12-10 Checking of image document and method for using same

Publications (2)

Publication Number Publication Date
CN1979516A CN1979516A (en) 2007-06-13
CN100462995C true CN100462995C (en) 2009-02-18

Family

ID=38122475

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB200510120652XA Active CN100462995C (en) 2005-12-10 2005-12-10 Checking of image document and method for using same

Country Status (2)

Country Link
CN (1) CN100462995C (en)
WO (1) WO2007065341A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101262493B (en) * 2008-01-14 2011-10-05 深圳市深信服电子科技有限公司 Method for accelerating inter-network data transmission via stream buffer
CN101957858A (en) * 2010-09-27 2011-01-26 中兴通讯股份有限公司 Data comparison method and device
CN103118045B (en) * 2011-11-17 2017-03-15 腾讯科技(深圳)有限公司 A kind of method and system of offline download
US10089323B2 (en) * 2012-04-05 2018-10-02 Microsoft Technology Licensing, Llc Telemetry system for a cloud synchronization system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1333973A (en) * 1998-11-20 2002-01-30 艾利森电话股份有限公司 Method and device for encryption of images
CN1431622A (en) * 2001-12-28 2003-07-23 佳能株式会社 Image verification system, its appts. and method
US20050149902A1 (en) * 2003-11-05 2005-07-07 Xuelong Shi Eigen decomposition based OPC model

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004034325A1 (en) * 2002-10-09 2004-04-22 Koninklijke Philips Electronics N.V. Localisation of image tampering
JP2004310386A (en) * 2003-04-04 2004-11-04 Canon Inc Image verification device, image verification method, computer program, and computer-readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1333973A (en) * 1998-11-20 2002-01-30 艾利森电话股份有限公司 Method and device for encryption of images
CN1431622A (en) * 2001-12-28 2003-07-23 佳能株式会社 Image verification system, its appts. and method
US20050149902A1 (en) * 2003-11-05 2005-07-07 Xuelong Shi Eigen decomposition based OPC model

Also Published As

Publication number Publication date
WO2007065341A1 (en) 2007-06-14
CN1979516A (en) 2007-06-13

Similar Documents

Publication Publication Date Title
Hoog et al. iPhone and iOS forensics: Investigation, analysis and mobile security for Apple iPhone, iPad and iOS devices
JP4250089B2 (en) Content reproduction apparatus and content reproduction control method
WO2018090642A1 (en) Application program upgrade method, user terminal and storage medium
TWI479334B (en) Method, computer storage medium and computer system for container reputation
CN105993018B (en) Content item encryption in mobile device
CN103530535A (en) Shell adding and removing method for Android platform application program protection
CN105204873B (en) A kind of terminal and application interface display methods
JP2008504592A (en) Secure data backup and playback
US11687664B2 (en) Blockchain-based file storage device and file access authorization system and method
US20110237326A1 (en) Data authentication method and data authentication system
CN100462995C (en) Checking of image document and method for using same
CN105706099A (en) Software update device, and software update program
CN101542480A (en) Combination journaling/non-journaling file system
TWI324349B (en) Secure protable storage device and control method for the same
US11449644B2 (en) Electronic device operating encryption for user data
US8332561B2 (en) Network adapter, method, and computer program product
CN102316164A (en) Cloud storage user side equipment and data processing method thereof
CN1992036B (en) Data transfer method, data transfer source apparatus and data transfer destination apparatus
JP2011193264A (en) Content distribution system, content server, client device, content distribution method, content distribution method of the content server, content acquisition method of client device and program
US7330980B2 (en) Method of and system for encrypting digital data, method of and apparatus for reproducing digital data, and computer product
US10140429B2 (en) Unified digital rights management for heterogenous computing platforms
US20100027797A1 (en) Playing Apparatus and Management Method
CN102982261B (en) Follow the tracks of the system and method for the digital media file downloaded
CN101625702B (en) Encryption method of data file with file allocation table format
CN106789836B (en) Electronic resource protection method and system

Legal Events

Date Code Title Description
C57 Notification of unclear or unknown address
DD01 Delivery of document by public notice

Addressee: Gui Yan

Document name: Written notice of preliminary examination of application for patent for invention

C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant