The content of the invention
Based on this, it is necessary in view of the above-mentioned problems, it is higher to provide a kind of encryption and decryption treatment effeciency, the stronger information of security
Encrypting and decrypting method, device, computer equipment and storage medium.
A kind of information ciphering method, methods described include:
When monitoring that application program switches to opening in mobile terminal, key string is generated at random, and store
The key string of generation;
When the application program sends communication request to server first, the server announced in advance using server is public
The key string of key asymmetric encryption generation, and the key string after encryption is sent to the server;
Obtain the document upload request that user triggers in the Application Program Interface;
The document carried in the document upload request is parsed, positions the privacy field in the document, and using random
Privacy field generation document ciphertext described in the key string symmetric cryptography of generation;
The document ciphertext of generation is uploaded to the server, so that after encryption of the server according to reception
The document ciphertext that key string and the privacy key decryption uploads.
In one embodiment, the document carried in the parsing document upload request, is positioned in the document
Privacy field, and use the step of privacy field generates document ciphertext described in the key string symmetric cryptography generated at random
Including:
Document to be uploaded is obtained according to the document upload request, institute is parsed using the instrument of the document format is supported
State document and obtain document content;
Privacy field to be encrypted is searched in the document content, obtains the positional information of the privacy field, union
Close the positional information generation obtained and expand field;
Use the privacy field in document described in the key string symmetric cryptography generated at random and the expansion word
Expansion field after section, generation document ciphertext and encryption.
In one embodiment, the document content is the form of field name corresponding field value;The privacy to be encrypted
Field is the field value;
It is described that privacy field to be encrypted is searched in the document content, the positional information of the privacy field is obtained,
And the step of gathering the positional information generation expansion field of acquisition, is:All field names in the document content are obtained, are gathered
Field is expanded in all field names generation obtained;
It is described that the document ciphertext of generation is uploaded to the server, so that encryption of the server according to reception
Afterwards the key string and privacy key decryption upload the document ciphertext the step of be:By the document ciphertext of generation
Sent with the expansion field after the encryption to the server, so that the server solves to the expansion field
The close set for obtaining all field names, each described privacy word in the document ciphertext is positioned by the field name
Section, and it is decrypted to obtain document in plain text to the privacy field of positioning.
A kind of information decryption method, methods described include:
The communication request that application program is sent in mobile terminal is received, obtains the key character carried in the communication request
String, the key string is that the mobile terminal generates at random when the application program is opened, and through announcing in advance
The processing of server public key asymmetric encryption;
The document upload request that the mobile terminal is sent is received, it is close to obtain the document carried in the document upload request
Text;
The key string is decrypted using privacy key, and using described in the key string decryption after decryption
Document ciphertext, so that the document shows privacy field.
In one embodiment, the expansion field of encrypted processing is also carried in the document upload request;
The key string is decrypted using privacy key, and using described in the key string decryption after decryption
Document ciphertext, so that the document is the step of showing privacy field:
The key string is decrypted using privacy key, and using described in the key string decryption after decryption
Field is expanded, obtains positional information corresponding to the privacy field encrypted in the document ciphertext;
The privacy field in the document ciphertext is positioned according to the positional information, uses the key after decryption
The privacy field of character string decryption positioning, obtain showing the document plaintext of the privacy field.
A kind of information encryption device, described device include:
Key string generation module, for when monitoring that application program switches to opening in mobile terminal, with
Machine generates key string, and stores the key string of generation;
Asymmetric encryption module, for when the application program sends communication request to server first, using service
The key string of server public key asymmetric encryption that device is announced in advance generation, and by the key character after encryption
String is sent to the server;
Acquisition request module, the document upload request triggered for obtaining user in the Application Program Interface;
Symmetrical encryption module, for parsing the document carried in the document upload request, position hidden in the document
Private field, and use privacy field generation document ciphertext described in the key string symmetric cryptography generated at random;
Document uploading module, for the document ciphertext of generation to be uploaded into the server, so that the server
The document ciphertext uploaded according to the key string and the privacy key decryption after the encryption of reception.
In one embodiment, the symmetrical encryption module includes:
Document parsing module, for obtaining document to be uploaded according to the document upload request, use the support text
The instrument of shelves form parses the document and obtains document content;
Field generation module is expanded, for searching privacy field to be encrypted in the document content, is obtained described hidden
The positional information of private field, and field is expanded in the positional information generation for gathering acquisition;
Encrypting module, for using the privacy field in document described in the key string symmetric cryptography generated at random
With the expansion field, the expansion field after generation document ciphertext and encryption.
In one embodiment, the document content is the form of field name corresponding field value;The privacy to be encrypted
Field is the field value;
The expansion field generation module, is additionally operable to obtain all field names in the document content, gathers acquisition
Field is expanded in all field name generations;
The document uploading module, it is additionally operable to send the expansion field after the document ciphertext of generation and the encryption
To the server, so that the server expansion field is decrypted the set for obtaining all field names, lead to
Each the described privacy field crossed in the field name positioning document ciphertext, and the privacy field of positioning is carried out
Decryption obtains document in plain text.
A kind of computer equipment, including memory, processor and be stored on the memory and can be in the processor
The computer program of upper operation, the step of realizing method described above during computer program described in the computing device.
A kind of computer-readable recording medium, is stored thereon with computer program, and the computer program is held by processor
The step of method described above is realized during row.
Above- mentioned information encrypting and decrypting method, device, computer equipment and storage medium, by being answered when mobile terminal detects
When being opened with program, key string is generated at random, and using the key string generated at random in document to be uploaded
Privacy field carries out symmetric cryptography, due to may relate to substantial amounts of privacy field in document, using the key character generated at random
String carries out symmetric cryptography, encryption efficiency high;Dynamic encryption and close to what is generated at random is carried out using the key that generates at random
Key character string carries out asymmetric encryption, effectively reduces the probability of key from stealing, improves cryptographic security, realizes symmetrical
Encryption and asymmetric encryption combination, substantial amounts of privacy field can not only quickly be encrypted, stochastic and dynamic it is close
The security advantages of key generating mode asymmetric encryption in addition make that the high in the clouds of information is transmitted and storage is more safe and reliable.
Embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, it is right below in conjunction with drawings and Examples
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.
As shown in figure 1, in one embodiment, there is provided a kind of applied environment figure of information ciphering method, this applies ring
Border figure includes mobile terminal 110 and server 120.Mobile terminal 110 can be communicated by network with server 120.Mobile terminal
110 can be at least one of smart mobile phone, tablet personal computer, notebook computer, POS, vehicle-mounted computer, but be not limited to
This.Server 120 can be the server cluster that independent physical server or multiple physical servers are formed.Move
Whether the application program of the dynamic monitoring of terminal 110 setting switches to opening, if so, then generating key string at random.It is mobile
The public key of server issue is previously stored with terminal 110, mobile terminal carries out non-using public key to the key string of generation
Symmetric cryptography processing, and the key string after encryption is uploaded onto the server storage.When mobile terminal is applied to service
When device sends document, symmetric cryptography is carried out to document using key string, and the document after encryption is sent to server, clothes
The private key prestored and the document uploaded from the key string that mobile terminal receives to mobile terminal can be used in business device
It is decrypted, to carry out corresponding document processing operations.
As shown in Fig. 2 in one embodiment, there is provided a kind of mobile terminal, can install using journey on the mobile terminal
Sequence.The mobile terminal include by system bus connection processor, built-in storage, non-volatile memory medium, network interface,
Display screen and input unit.Wherein, the processor is used to provide calculating and control ability, supports the operation of whole mobile terminal.
The non-volatile memory medium of the mobile terminal is stored with operating system and computer executable instructions, and the computer is executable to be referred to
Order can realize a kind of information ciphering method that following embodiment is provided performed by processor.Internal memory in mobile terminal
Reservoir provides environment for the operating system in non-volatile memory medium and the operation of computer executable instructions.Network interface is used
Communicated in being connected to network.Display screen is used to show various interfaces, such as, Application Program Interface can be shown.Input unit
For the touch layer covered on display screen, various control instructions are inputted for confession user, for example, in the present embodiment, being available for user
Input application program open command and document uploading instructions etc..
It will be understood by those skilled in the art that the structure of the mobile terminal shown in Fig. 2, only with application scheme phase
The block diagram of the part-structure of pass, the restriction for the mobile terminal being applied thereon to application scheme is not formed, it is specific to move
Dynamic terminal can include, than more or less parts shown in figure, either combining some parts or having different parts
Arrangement.
As shown in figure 3, in one embodiment, there is provided a kind of information ciphering method, this method is to be applied to such as Fig. 2 institutes
Illustrate, specifically comprise the following steps exemplified by the mobile terminal shown:
Step S202:It is random to generate key character when monitoring that application program switches to opening in mobile terminal
String, and store the key string of generation.
The status information of mobile terminal monitored one or more application program specified, when monitor application program from
When Not running are switched to opening (such as Active foregrounds active state or Background background operation states),
Mobile terminal generates key string according to the random algorithm of setting, and the key string of generation is stored in internal memory.
In one embodiment, whether application is switched on can be judged to the trigger action of application program by monitoring user
Open state.Whether opening can also be switched to by monitoring the log information determining program of application program.Further,
When detecting that terminal is in networking state, just the state of terminal applies is monitored.
In one embodiment, when key string is stored in internal memory, the also generation of the associated storage key string
Time and corresponding application program identification.For example, the form of storage content can be:The application program A+ generation times+close
Key character string.
Step S204:When application program sends communication request to server first, add using server public key is asymmetric
It is dense into key string, and the key string after encryption is sent to server.
Using the time for switching to opening as starting point, monitor whether application program asks to be communicated with server, when
Application program ask first with (such as application requests login service device) during server communication, mobile terminal use prestores
The key string that generates at random of server public key asymmetric encryption, and by the key string after encryption with foundation first
Communication port is sent to server.Such as ask to send the key string after encryption to server with login service device.
In one embodiment, can also be after key string be generated, before carrying out memory storage to key string, i.e.,
Obtain server public key and asymmetric encryption is carried out to key string, the key string after encryption is stored.Work as application
When program communicates first with server, directly the key string after the encryption of storage is sent to clothes with the communication port of foundation
Business device, to avoid dragging the efficiency asked slowly.
Step S206:Obtain the document upload request that user triggers in Application Program Interface.
Step S208:The document that carries in parsing document upload request, the privacy field in locating documents, and using random
The key string symmetric cryptography privacy field generation document ciphertext of generation.
Here document can be the software document that developer writes, such as software requirement document, test document.For
Back up in the high in the clouds that the information ciphering method of above-mentioned document is applied to development phase document.Can also be in application program and server
Between interaction document, can be local document.As local document is sent to good friend, it is necessary to which upload server is by servicing by user
Device is forwarded to specified good friend.
, can be by triggering in Application Program Interface when user needs to upload onto the server the data in application program
Button, document upload request is sent to server, document identification to be uploaded is carried in the document upload request.In the present embodiment
In, privacy information is included in document corresponding to document identification, the privacy information can be telephone number information, identification number letter
Breath and consumption information etc..
Mobile terminal can obtain document to be uploaded according to document identification, and parse and document content is obtained in document, according to
The privacy information search rule of setting searches the privacy information included in document to position privacy field corresponding to privacy information,
And using the key string (key string without server public key asymmetric encryption) generated at random to the privacy of positioning
Field is encrypted, and generates document ciphertext.Only privacy field is carried out with the character string formed after encrypting in the document ciphertext of generation
Secret display, other guide are shown in the form of original plaintext.
In one embodiment, the privacy information in document to be uploaded can also be marked in advance, such as word plus
Slightly or privacy information etc. is highlighted with different colors.During privacy field in locating documents, only marker bit need to be searched
Put.After privacy field is encrypted, can remove the mark of privacy field can not also remove, and can specifically enter as needed
Row configuration.
Step S210:The document ciphertext of generation is uploaded onto the server, so that server is according to close after the encryption of reception
The document ciphertext that key character string and privacy key decryption upload.
The document ciphertext of generation is uploaded onto the server, so that server carries out storage backup.When server is needed to upper
, can be by close to document from the key string after the encryption of acquisition for mobile terminal when the document of biography carries out corresponding data processing
Text is decrypted to obtain original plaintext document.
Specifically, the step of server decrypted document ciphertext, is:Key character first by privacy key to encryption
String is decrypted, and obtains key string;Key string is reused the privacy field in document ciphertext is decrypted.
Because key string is using asymmetric encryption, the security of key string, and only pin has been effectively ensured
Asymmetric encryption and decryption is carried out to the less key string of data volume, does not interfere with encryption and decryption efficiency.Privacy field is used
It is symmetrical encryption and decryption, also being capable of quick encryption and decryption even if privacy field substantial amounts.The namely information decryption side of the present embodiment
Method is the safety that ensure that encryption and decryption efficiency and effectively ensured information.
The present embodiment realizes the combination of symmetric cryptography and asymmetric encryption, can not only be to substantial amounts of privacy field
Quickly encrypted, the security advantages of the key generating mode of stochastic and dynamic asymmetric encryption in addition transmit the high in the clouds of information
It is more safe and reliable with storing.
In one embodiment, as shown in figure 4, step S208:The document carried in parsing document upload request, positioning text
Privacy field in shelves, and included using the key string symmetric cryptography privacy field generation document ciphertext generated at random:
Step S302:Document to be uploaded is obtained according to document upload request, is parsed using the instrument of document format is supported
Document obtains document content.
Acquisition for mobile terminal user specifies the document uploaded, and uses the instrument of the support upload document format (such as
Office softwares) open or identify document content.
If document is txt forms, the document content is parsed using organizer program.If document is xlsx forms, make
The document content is parsed with excel table procedures.
Step S304:Privacy field to be encrypted is searched in document content, obtains the positional information of privacy field, union
Close the positional information generation obtained and expand field.
In one embodiment, the attribute information of privacy field is preset, is searched according to attribute information set in advance
Privacy field included in document content.The attribute information of privacy field can set the numeric string of digit, such as 11
Numeric string (mobile communication number), the numeric string (identity card numbering) of 13;It can also be the sensitive front/rear setting word of word of setting
Information corresponding at section, such as sensitive word is " user name ", " password ", and the character string occurred after user name is privacy field;
The character string including setting symbol is can also be, such as includes the consumption information, account information etc. of " " symbol.
In another embodiment, obtain user triggered in Application Program Interface document upload request the step of it
Afterwards, in addition to:Call the instrument for supporting the document form to show document to be uploaded, obtain the assigned operation of user, this is specified
The privacy field to be encrypted in document is specified in operation.
Specified determination privacy field of the privacy field according further to user is either determined by the attribute of setting, it is determined that
After privacy field, positional information of the privacy field of determination in document content, each privacy field corresponding one are obtained
Individual positional information.And then the positional information set of the privacy field of acquisition is expanded in field at one.It is, generation one
Field is expanded, the expansion field includes the positional information of all privacy fields to be encrypted.
Step S306:Using the privacy field in the key string symmetric cryptography document generated at random and field is expanded,
Generate the expansion field after document ciphertext and encryption.
The privacy field determined using the key string pair generated in step S202 carries out symmetric cryptography processing, generation text
Shelves ciphertext, while the expansion field of generation is also encrypted using key string.
In one embodiment, when document to be uploaded is configuration file, that is, content in document is field name
The form of corresponding field value.For example, the content in document is:Name=zhangsan, phoneNumber=
12345678910, wherein, name and phoneNumber are field name, and zhangsan and 12345678910 is field value.It is to be added
Close privacy field is field value, that is, needs that the field value zhangsan and 12345678910 after equal sign is encrypted
Processing.
When document to be uploaded is above-mentioned configuration file, step S304:Searched in document content to be encrypted hidden
Private field, obtains the positional information of privacy field, and field is expanded in the positional information generation for gathering acquisition, in the present embodiment
For:The field name in document is obtained, field is expanded in all field names generation for gathering acquisition.
In the present embodiment, as shown in figure 5, information ciphering method comprises the following steps:
Step S402:It is random to generate key character when monitoring that application program switches to opening in mobile terminal
String, and store the key string of generation.
Step S404:When application program sends communication request to server first, add using server public key is asymmetric
It is dense into key string, and the key string after encryption is sent to server.
Step S406:The document upload request that user triggers in Application Program Interface is obtained, is taken in document upload request
With document to be uploaded, wherein, document to be uploaded is the form of field name corresponding field value, and privacy field to be encrypted is word
Segment value;
Step S408:Using supporting the instrument parsing document of document format to obtain document content, obtain all in document
Field is expanded in field name, all field names generation for gathering acquisition.
Step S410:Using the key string symmetric cryptography privacy field generated at random and field is expanded, generates document
Expansion field after ciphertext and encryption.
Step S412:The expansion field after the document ciphertext of generation and the encryption is sent to the server,
So that server expansion field is decrypted the set for obtaining all field names, by every in field name locating documents ciphertext
One privacy field, and it is decrypted to obtain document in plain text to the privacy field of positioning.
For example, the field entitled name and phoneNumber in document, corresponding field value be zhangsan and
12345678910, the document ciphertext after key string is encrypted is:Name=xxxx1, phoneNumber=xxxx2 are raw
Into expansion field be { namephoneNumber }, the expansion field after encryption is { xxx1xxx2 }.Server receives encryption
Document ciphertext afterwards solves with after the expansion field { xxx1xxx2 } after encryption first by key string to expanding field
The dense expansion field { namephoneNumber } into after decryption, word segmentation processing then is carried out to the character string expanded in field,
Two character strings of name and phoneNumber are obtained, and then search document ciphertext, fast positioning name and phoneNumber institutes
Position in a document, so fast positioning into document by the privacy field xxxx1 and xxxx2 of encryption, then to fixed
The privacy field of position is decrypted to obtain zhangsan and 12345678910, the finger obtained field value being inserted into document
Positioning is put, and generation document is in plain text.
In the present embodiment, field is expanded by transmitting, the field that can be encrypted in fast positioning document, and then realize quick essence
Accurate decryption is to obtain original document.Terminal with server without carrying out privacy field title agreement, the encryption solution of privacy field
It is close more flexible and efficient.
In one embodiment, information ciphering method also comprises the following steps:When monitoring terminal applies from opening
It is switched to when logging off state, mobile terminal removes the key string of the application program of storage.
In one embodiment, as shown in Figure 6, there is provided a kind of server, the server include connecting by system bus
Processor, non-volatile memory medium, built-in storage and the network interface connect.Wherein, the non-volatile memories of the server are situated between
Matter is stored with operating system and computer executable instructions, and the computer executable instructions are used to realize one suitable for server
Kind information decryption method.The processor is used to provide calculating and control ability, supports the operation of whole server.In server
Built-in storage provides environment for the operating system in non-volatile memory medium and the operation of computer executable instructions, the service
The network interface of device is used to carry out network service with mobile terminal.It will be understood by those skilled in the art that the knot shown in Fig. 6
The block diagram of structure, the only part-structure related to application scheme, do not form what application scheme was applied thereon
The restriction of server, specific server can be included than more or less parts shown in figure, or some parts of combination,
Or arranged with different parts.
In one embodiment, as shown in Figure 7, there is provided a kind of information decryption method, this method is with using above-mentioned clothes
Illustrate, specifically comprise the following steps exemplified by business device:
Step S502:The communication request that application program is sent in mobile terminal is received, is carried in acquisition communication request close
Key character string, key string is that mobile terminal is randomly generated in application program unlatching, and the server through announcing in advance
The processing of public key asymmetric encryption.
Server previously generates a pair of secret keys pair, server public key and privacy key.Server is pre- by server public key
Mobile terminal is first distributed to, mobile terminal stores to server public key.
Server receives the key string through server public key asymmetric encryption that mobile terminal is sent, the key character
What string generated at random when mobile terminal is monitoring application program launching.
Step S504:The document upload request that mobile terminal is sent is received, obtains the document carried in document upload request
Ciphertext.
Step S506:Using the private key decruption key character string prestored in server, and use the key after decryption
Character string decrypted document ciphertext, so that document shows privacy field.
Server uses privacy key decruption key character string, and close using the key string decrypted document after decryption
Text.
The present embodiment realizes the combination of symmetrical encryption and decryption and asymmetric encryption and decryption, can not only be to substantial amounts of privacy
Field carries out quick encryption and decryption, and the security advantages of the key generating mode of stochastic and dynamic asymmetric encryption and decryption in addition make information
High in the clouds is transmitted and storage is more safe and reliable.
In one embodiment, as shown in Figure 8, there is provided a kind of information decryption method, specifically comprise the following steps:
Step S602:The communication request that application program is sent in mobile terminal is received, is carried in acquisition communication request close
Key character string, key string is that mobile terminal generates at random when application program is opened, and the server through announcing in advance
The processing of public key asymmetric encryption.
Step S604:The document upload request that mobile terminal is sent is received, obtains the document carried in document upload request
Ciphertext and the expansion field encrypted through key string, the positional information for the privacy field encrypted is expanded in field document.
Step S606:Opened up using privacy key decruption key character string, and using the key string decryption after decryption
Open up field, the positional information for the privacy field encrypted.
Step S608:According to the privacy field in positional information locating documents ciphertext, the key string after decryption is used
The privacy field of positioning is decrypted, obtains showing the document plaintext of privacy field.
In the present embodiment, field is expanded by transmitting, the field that can be encrypted in fast positioning document, and then realize quick essence
Accurate decryption obtains original document.Terminal with server without carrying out privacy field title agreement, the encrypting and decrypting of privacy field
It is more flexible and efficient.
In one embodiment, as shown in Figure 9, there is provided a kind of information encryption device, the device include:
Key string generation module 702, for when monitoring that application program switches to opening in mobile terminal,
Random generation key string, and store the key string of generation.
Asymmetric encryption module 704, for when application program sends communication request to server first, using server
The key string for the server public key asymmetric encryption generation announced in advance, and the key string after encryption is sent to clothes
Business device.
Acquisition request module 706, the document upload request triggered for obtaining user in Application Program Interface.
Symmetrical encryption module 708, for parsing the document carried in document upload request, the privacy word in locating documents
Section, and use the key string symmetric cryptography privacy field generation document ciphertext generated at random.
Document uploading module 710, for the document ciphertext of generation to be uploaded onto the server, so that server is according to reception
The document ciphertext that key string and privacy key decryption after encryption upload.
In one embodiment, as shown in Figure 10, symmetrical encryption module 708 includes:
Document parsing module 802, for obtaining document to be uploaded according to document upload request, use support document format
Instrument parsing document obtain document content.
Field generation module 804 is expanded, for searching privacy field to be encrypted in document content, obtains privacy field
Positional information, and gather acquisition positional information generation expand field.
Encrypting module 806, for using the privacy field in the key string symmetric cryptography document generated at random and opening up
Open up field, generation document ciphertext and the expansion field after encryption.
In one embodiment, document content is the form of field name corresponding field value;Privacy field to be encrypted is word
Segment value.
Field generation module 804 is expanded, is additionally operable to obtain all field names in document content, gathers all words of acquisition
Field is expanded in section name generation.
Document uploading module 710, it is additionally operable to send the expansion field after the document ciphertext of generation and encryption to server,
So that server expansion field is decrypted the set for obtaining all field names, by every in field name locating documents ciphertext
One privacy field, and it is decrypted to obtain document in plain text to the privacy field of positioning.
In one embodiment, as shown in figure 11, there is provided a kind of information decrypts device, and the device includes:
Communication request receiving module 902, for receiving the communication request that application program is sent in mobile terminal, obtain communication
The key string carried in request, key string are that mobile terminal generates at random when application program is opened, and through pre-
The server public key asymmetric encryption processing first announced.
Document ciphertext receiving module 904, for receiving the document upload request of mobile terminal transmission, obtaining document upload please
Seek the document ciphertext of middle carrying.
Document deciphering module 906, for using privacy key decruption key character string, and use the key word after decryption
Symbol string decrypted document ciphertext, so that document shows privacy field.
In one embodiment, the expansion field of encrypted processing is also carried in document upload request;
Document deciphering module 906, privacy key decruption key character string is also used for, and uses the key after decryption
Field is expanded in character string decryption, obtains positional information corresponding to the privacy field encrypted in document ciphertext;Determined according to positional information
Privacy field in the document ciphertext of position, the privacy field of positioning is decrypted using the key string after decryption, obtains showing hidden
The document of private field is in plain text.
In one embodiment, there is provided a kind of computer equipment, the computer equipment can be mobile terminal, including deposit
Reservoir, processor and storage on a memory and the computer program that can run on a processor, reality during computing device program
Now once step:When monitoring that application program switches to opening in mobile terminal, key string is generated at random, and deposit
Store up the key string of generation;It is pre- using server when the application program sends communication request to server first
The key string for the server public key asymmetric encryption generation first announced, and the key string after encryption is sent out
Deliver to the server;Obtain the document upload request that user triggers in the Application Program Interface;Parse on the document
The document carried in request is passed, positions the privacy field in the document, and use the key string pair generated at random
Claim to encrypt the privacy field generation document ciphertext;The document ciphertext of generation is uploaded to the server, so that described
Server decrypts the document ciphertext uploaded according to the key string and privacy key after the encryption of reception.
In one embodiment, carried in the parsing document upload request performed by computer equipment processor
Document, position the privacy field in the document, and using hidden described in the key string symmetric cryptography generated at random
The step of private field generation document ciphertext, includes:Document to be uploaded is obtained according to the document upload request, uses support institute
The instrument parsing document for stating document format obtains document content;Privacy word to be encrypted is searched in the document content
Section, obtains the positional information of the privacy field, and field is expanded in the positional information generation for gathering acquisition;Use what is generated at random
After privacy field and the expansion field in document described in the key string symmetric cryptography, generation document ciphertext and encryption
Expansion field.
In one embodiment, the document content is the form of field name corresponding field value;The privacy to be encrypted
Field is the field value;
Described performed by the computer equipment processor searches privacy field to be encrypted in the document content,
Obtain the positional information of the privacy field, and gather acquisition positional information generation expand field the step of be:Described in acquisition
Field is expanded in all field names in document content, all field names generation for gathering acquisition;
The document ciphertext of generation is uploaded to the server by described performed by the computer equipment processor,
So that the server decrypts the document uploaded according to the key string and privacy key after the encryption of reception
The step of ciphertext is:The expansion field after the document ciphertext of generation and the encryption is sent to the server, so that
The server expansion field is decrypted the set for obtaining all field names, and institute is positioned by the field name
Each described privacy field in document ciphertext is stated, and is decrypted to obtain document in plain text to the privacy field of positioning.
In one embodiment, there is provided a kind of computer equipment, the computer equipment can be servers, including storage
Device, processor and storage are realized on a memory and the computer program that can run on a processor, during computing device program
Step once:The communication request that application program is sent in mobile terminal is received, obtains the key word carried in the communication request
Symbol string, the key string is that the mobile terminal generates at random when the application program is opened, and through announcing in advance
Server public key asymmetric encryption processing;The document upload request that the mobile terminal is sent is received, is obtained on the document
Pass the document ciphertext carried in request;The key string is decrypted using privacy key, and using described close after decryption
Key character string decrypts the document ciphertext, so that the document shows privacy field.
In one embodiment, the expansion field of encrypted processing is also carried in the document upload request;
Use privacy key performed by computer equipment processor decrypts the key string, and after use decryption
The key string decrypt the document ciphertext so that the document is the step of showing privacy field:Use service
Device private key decrypts the key string, and decrypts the expansion field using the key string after decryption, obtains institute
State positional information corresponding to the privacy field encrypted in document ciphertext;Positioned according to the positional information in the document ciphertext
The privacy field, the privacy field of positioning is decrypted using the key string after decryption, obtain showing described
The document of privacy field is in plain text.
In one embodiment, there is provided a kind of computer-readable recording medium, be stored thereon with computer program, calculate
Machine program realizes following steps when being executed by processor:When monitoring that application program switches to opening in mobile terminal,
Random generation key string, and store the key string of generation;When the application program is sent to server first
During communication request, the key string for the server public key asymmetric encryption generation announced in advance using server, and will
The key string after encryption is sent to the server;Obtain the document that user triggers in the Application Program Interface
Upload request;The document carried in the document upload request is parsed, positions the privacy field in the document, and using random
Privacy field generation document ciphertext described in the key string symmetric cryptography of generation;The document ciphertext of generation is uploaded
To the server, so that the server is according in the key string and the privacy key decryption after the encryption of reception
The document ciphertext passed.
In one embodiment, the document carried in the parsing document upload request performed by processor, it is fixed
Privacy field in the document of position, and generated using privacy field described in the key string symmetric cryptography generated at random
The step of document ciphertext, includes:Document to be uploaded is obtained according to the document upload request, uses the support document format
Instrument parse the document and obtain document content;Privacy field to be encrypted is searched in the document content, described in acquisition
The positional information of privacy field, and field is expanded in the positional information generation for gathering acquisition;Use the key word generated at random
Privacy field and the expansion field in document described in symbol string symmetric cryptography, generation document ciphertext and the expansion word after encryption
Section.
In one embodiment, the document content is the form of field name corresponding field value;The privacy to be encrypted
Field is the field value;
Described performed by processor searches privacy field to be encrypted in the document content, obtains the privacy word
Section positional information, and gather acquisition positional information generation expand field the step of be:Obtain the institute in the document content
There is field name, field is expanded in all field names generation for gathering acquisition;
The document ciphertext of generation is uploaded to the server by described performed by processor, so that the server
It is according to the step of document ciphertext of the key string and privacy key the decryption upload after the encryption of reception:Will
The expansion field after the document ciphertext of generation and the encryption is sent to the server, so that the server is to described
Expand field and the set for obtaining all field names is decrypted, positioned by the field name every in the document ciphertext
One privacy field, and it is decrypted to obtain document in plain text to the privacy field of positioning.
In one embodiment, there is provided a kind of computer-readable recording medium, be stored thereon with computer program, calculate
Machine program realizes following steps when being executed by processor:The communication request that application program is sent in mobile terminal is received, obtains institute
The key string carried in communication request is stated, the key string is the mobile terminal when the application program is opened
Generate at random, and the processing of the server public key asymmetric encryption through announcing in advance;Receive the document that the mobile terminal is sent
Upload request, obtain the document ciphertext carried in the document upload request;The key character is decrypted using privacy key
String, and the document ciphertext is decrypted using the key string after decryption, so that the document shows privacy field.
In one embodiment, the expansion field of encrypted processing is also carried in the document upload request;
The key string is decrypted using privacy key performed by processor, and uses the key after decryption
Character string decrypts the document ciphertext, so that the document is the step of showing privacy field:Decrypted using privacy key
The key string, and the expansion field is decrypted using the key string after decryption, obtain the document ciphertext
Positional information corresponding to the privacy field of middle encryption;The privacy word in the document ciphertext is positioned according to the positional information
Section, the privacy field of positioning is decrypted using the key string after decryption, obtains showing the privacy field
Document is in plain text.
One of ordinary skill in the art will appreciate that realize all or part of flow in above-described embodiment method, being can be with
The hardware of correlation is instructed to complete by computer program, program can be stored in a computer read/write memory medium, such as
In the embodiment of the present invention, the program can be stored in the storage medium of computer system, and by the computer system at least
One computing device, to realize the flow for including the embodiment such as above-mentioned each method.Wherein, storage medium can be magnetic disc, light
Disk, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access Memory,
RAM) etc..
Each technical characteristic of above example can be combined arbitrarily, to make description succinct, not to above-described embodiment
In each technical characteristic it is all possible combination be all described, as long as however, lance is not present in the combination of these technical characteristics
Shield, all it is considered to be the scope of this specification record.
Above example only expresses the several embodiments of the present invention, and its description is more specific and detailed, but can not
Therefore it is construed as limiting the scope of the patent.It should be pointed out that for the person of ordinary skill of the art,
On the premise of not departing from present inventive concept, various modifications and improvements can be made, these belong to protection scope of the present invention.
Therefore, the protection domain of patent of the present invention should be determined by the appended claims.