CN107087004A - Source file processing method and processing device, source file acquisition methods and device - Google Patents
Source file processing method and processing device, source file acquisition methods and device Download PDFInfo
- Publication number
- CN107087004A CN107087004A CN201710346650.5A CN201710346650A CN107087004A CN 107087004 A CN107087004 A CN 107087004A CN 201710346650 A CN201710346650 A CN 201710346650A CN 107087004 A CN107087004 A CN 107087004A
- Authority
- CN
- China
- Prior art keywords
- new file
- source
- new
- file
- file name
- 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.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/602—Providing cryptographic facilities or services
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/62—Protecting access to data via a platform, e.g. using keys or access control rules
- G06F21/6209—Protecting access to data via a platform, e.g. using keys or access control rules to a single file or object, e.g. in a secure envelope, encrypted and accessed using a key, or with access control rules appended to the object itself
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/06—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
- H04L9/0618—Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
- H04L9/0625—Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation with splitting of the data block into left and right halves, e.g. Feistel based algorithms, DES, FEAL, IDEA or KASUMI
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/06—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
- H04L9/0618—Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
- H04L9/0631—Substitution permutation network [SPN], i.e. cipher composed of a number of stages or rounds each involving linear and nonlinear transformations, e.g. AES algorithms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/06—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
- H04L9/0643—Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0861—Generation of secret information including derivation or calculation of cryptographic keys or passwords
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2221/00—Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F2221/21—Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F2221/2107—File encryption
Abstract
The embodiment of the invention discloses a source file processing method and processing device, source file acquisition methods and device.The source file processing method includes:Compiling source file is obtained, wherein, compiling source file includes source filename and source file content;Source filename and preset characters string are encrypted according to the first predetermined encryption algorithm and obtain encrypted result, and regard encrypted result as new file name;According to new file name generation encryption key pair;Source file content is encrypted according to the second predetermined encryption algorithm using encryption key pair, to obtain new file content;New file content is named with new file name and obtains new file.The technical scheme that the present embodiment is provided, efficiently solve compiled in network transmission process source file be tampered and compile source file download to client it is local after by third party's deciphering or the problem of distort, it is ensured that the security of client data.
Description
Technical field
The present embodiments relate to field of computer technology, more particularly to a source file processing method and processing device, source document
Part acquisition methods and device.
Background technology
Generally, client is obtained from server end by way of network request and downloads compiling source file, and it is entered
Row is parsed and rendered.
However, compiling source file be intercepted in the network transmission process of client is transferred to from server end, easily or
Eavesdropping, even if network transmission protocol HTTP (Hyper Text Ttransfer Protocol, HTTP) is upgraded
For HTTPS (Hyper Text Ttransfer Protocol over Secure Socker Layer, secure hyper text transport
Agreement), can also exist DNS (Domain Name System, domain name system) kidnap, client to compiling source code from decompiling
HTTPS CertPubKeys are obtained afterwards, so that in the presence of carrying out data cutout in application layer, the hidden danger such as distort.Even in network transmission mistake
Do not have in journey because attack cause distorting for data, will compiling source file download to client it is local after, however it remains be hacked
Visitor directly obtains compiling source file, and checks or change the risk of file content.
The content of the invention
The present invention provides a source file processing method and processing device, source file acquisition methods and device, to solve network biography
Compiled during defeated source file be tampered and compile source file download to client it is local after by third party's deciphering or asking of distorting
Topic, to ensure the security of client data.
In a first aspect, the embodiments of the invention provide a source file processing method, this method includes:
Compiling source file is obtained, wherein, the compiling source file includes source filename and source file content;
The source filename and preset characters string are encrypted according to the first predetermined encryption algorithm and obtain encrypted result, and
It regard the encrypted result as new file name;
According to new file name generation encryption key pair;
The source file content is encrypted according to the second predetermined encryption algorithm using the encryption key pair, it is new to obtain
File content;
The new file content is named with new file name and obtains new file.
Second aspect, the embodiment of the present invention additionally provides a source file acquisition methods, and this method includes:
The new file generated according to compiling source file and the corresponding source filename of the compiling source file are obtained, wherein described
New file includes new file content and the first new file name;
The source filename and preset characters string are encrypted according to the first predetermined encryption algorithm and obtain encrypted result, and
It regard the encrypted result as the second new file name;
When first new file name is consistent with second new file name, solved according to first new file name generation
Key spoon;
The new file content is decrypted according to default decipherment algorithm using the decryption key, to obtain the volume
Translate the content of source file.
The third aspect, the embodiment of the present invention additionally provides a source file processing unit, and the device includes:
Source file acquisition module, for obtaining compiling source file, wherein, the compiling source file includes source filename and source
File content;
Source filename encrypting module, for the source filename to be entered with preset characters string according to the first predetermined encryption algorithm
Row encryption obtains encrypted result, and regard the encrypted result as new file name;
Encryption key pair generation module, for according to new file name generation encryption key pair;
Source file content-encrypt module, is added for being preset the source file content according to second using the encryption key pair
Close algorithm is encrypted, to obtain new file content;
New file acquisition module, new file is obtained for the new file content to be named with new file name.
Fourth aspect, the embodiment of the present invention additionally provides a source file acquisition device, and the device includes:
Acquisition module, for obtaining the new file generated according to compiling source file and the corresponding source document of the compiling source file
Part name, wherein the new file includes new file content and the first new file name;
Second new file name acquisition module, for the source filename and preset characters string to be calculated according to the first predetermined encryption
Method, which is encrypted, obtains encrypted result, and regard the encrypted result as the second new file name;
Decryption key generation module, for when first new file name is consistent with second new file name, according to
The first new file name generation decryption key;
New file content decryption module, for being calculated the new file content according to default decryption using the decryption key
Method is decrypted, to obtain the content of the compiling source file.
The embodiment of the present invention compiles source file by obtaining, wherein, the compiling source file includes source filename and source document
Part content;The source filename and preset characters string are encrypted according to the first predetermined encryption algorithm and obtain encrypted result, and
It regard the encrypted result as new file name;According to new file name generation encryption key pair;Using the encryption key pair by institute
State source file content to be encrypted according to the second predetermined encryption algorithm, to obtain new file content;By the new file content with
The new file name, which is named, obtains new file;Obtain the new file generated according to compiling source file and the compiling source file
Corresponding source filename, wherein the new file includes new file content and the first new file name;By the source filename and in advance
If character string is encrypted according to the first predetermined encryption algorithm and obtains encrypted result, and regard the encrypted result as the second new text
Part name;When first new file name is consistent with second new file name, decrypted according to first new file name generation
Key;The new file content is decrypted according to default decipherment algorithm using the decryption key, to obtain the compiling
The content of source file, efficiently solves and source file is compiled in network transmission process is tampered and compiles source file and download to client
The problem of being understood or distorted by third party after local, it is ensured that the security of client data.
Brief description of the drawings
Fig. 1 is the flow chart for the source file processing method that the embodiment of the present invention one is provided;
Fig. 2 is the flow chart for the source file acquisition methods that the embodiment of the present invention two is provided;
Fig. 3 is the structural representation for the source file processing unit that the embodiment of the present invention three is provided;
Fig. 4 is the structural representation for the source file acquisition device that the embodiment of the present invention four is provided.
Embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining the present invention, rather than limitation of the invention.It also should be noted that, in order to just
Part related to the present invention rather than entire infrastructure are illustrate only in description, accompanying drawing.
Embodiment one
Fig. 1 is the flow chart of source file processing method provided in an embodiment of the present invention, and this method can be by source file
Processing unit is performed, and wherein the device can be realized by software and/or hardware, typically can it is integrated in the server.As shown in figure 1,
This method includes:
S110, acquisition compiling source file, wherein, the compiling source file includes source filename and source file content.
In the present embodiment, compiling source file is obtained, wherein compiling source file refers to directly add after client downloads
Carry, the file for being parsed and being rendered to it.Exemplary, in Weex technic relization schemes .we files are can not direct quilt
Loading, therefore .we files are converted into .js files.Weex is built and is compiled as js source files.Wherein, source file is compiled
Including source filename and source file content.Specifically, the js source files after compiling can will be built with " the domain name business pages
.hash rule " carries out file designation.
S120, the source filename and preset characters string be encrypted according to the first predetermined encryption algorithm obtain encryption knot
Really, and using the encrypted result it is used as new file name.
In the present embodiment, the first predetermined encryption algorithm is rivest, shamir, adelman, can such as use MD5 (Message
Digest Algorithm, message digest algorithm the 5th edition), MD4 (Message Digest Algorithm, informative abstract calculate
Method fourth edition) or the rivest, shamir, adelman such as MD2 (Message Digest Algorithm, the message digest algorithm second edition).
Specifically, source filename is encrypted with preset characters string according to rivest, shamir, adelman, and it regard encrypted result as new text
Part name.Wherein, preset characters string is user's character string set in advance as needed, to the particular content and character string of character string
Length do not limit.Exemplary, after source filename and preset characters string are encrypted according to AES MD5, obtain
New file name.
S130, according to the new file name generation encryption key pair.
In the present embodiment, new file name one encryption key pair of generation obtained according to S120, wherein can directly will be newly
Filename can also resequence the corresponding character string of new file name according to presetting method directly as an encryption key pair,
And integrally it regard the character string after sequence as encryption key pair, it is preferred that obtain the corresponding word of predeterminated position of the new file name
Symbol string;It regard the corresponding character string of the predeterminated position as encryption key pair.It is, of course, also possible to take the predeterminated position pair of new file name
The character string answered is re-started after sequence, is used as encryption key pair.Exemplary, directly take the 8-24 positions correspondence of new file name
The character string of 16 be used as encryption key pair.The present embodiment is not limited the concrete mode that encryption key pair is obtained according to new file name
It is fixed.
S140, using the encryption key pair source file content is encrypted according to the second predetermined encryption algorithm, with
Obtain new file content.
Specifically, the second predetermined encryption algorithm is symmetric encipherment algorithm, for example, it can use DES (Data Encryption
Standard, symmetry algorithm), 3DES (Triple DES, the symmetry algorithm based on DES), IDEA (International Data
Encryption Algorithm, IDEA) or DSA (Digital Signature Algorithm, number
Word signature algorithm) etc. symmetric encipherment algorithm.AES (Advanced Encryption Standard, superencipherment can also be used
Algorithm) etc., the present embodiment is not limited this.The source file content that the encryption key pair obtained using S130 is obtained S110 according to
Second predetermined encryption algorithm is encrypted, and obtains new file content.Exemplary, by the S110 source file contents obtained and S130
Obtained encryption key pair carries out AES encryption, and regard encrypted result as new file content.
S150, the new file content is named with new file name and obtained new file.
Specifically, new file content and new file name are collectively constituted into a new file, i.e., by new file content with new text
Part name, which is named, obtains new file.It is preferred that, the new file content is named as and the compiling with new file name
The different new file of source file format.Exemplary, compiling source file is .js source files, that is, the form for compiling source file is .js
New file content, can be named as the new file of .lx forms by form with new file name.
The source file processing method that the present embodiment is provided, by obtaining compiling source file, wherein, the compiling source document
Part includes source filename and source file content;The source filename and preset characters string are carried out according to the first predetermined encryption algorithm
Encryption obtains encrypted result, and regard the encrypted result as new file name;According to new file name generation encryption key pair;Profit
The source file content is encrypted according to the second predetermined encryption algorithm with the encryption key pair, to obtain new file content;
The new file content is named with new file name and obtains new file, is realized to source filename and source file content
Obscure encryption, obtained special new file, efficiently solve in network transmission process compile source file be tampered and compile
Source file download to client it is local after understood by third party or the problem of distort, it is ensured that the security of client data.
Embodiment two
Fig. 2 is the flow chart of source file acquisition methods provided in an embodiment of the present invention, and this method can be by source file
Acquisition device is performed, and wherein the device can be realized by software and/or hardware, typically can it is integrated in the terminal.Such as Fig. 2 institutes
Show, this method includes:
New file and the corresponding source filename of the compiling source file that S210, acquisition are generated according to compiling source file, its
Described in new file include new file content and the first new file name.
In the present embodiment, when client needs to download a certain specified APP or a certain webpage, user end to server hair
Network request is played, server is by the corresponding new file generated according to compiling source file and compiles the corresponding source filename of source file
Client is transferred in the form of installation kit.Wherein, new file includes new file content and the first new file name.
S220, the source filename and preset characters string be encrypted according to the first predetermined encryption algorithm obtain encryption knot
Really, and using the encrypted result it is used as the second new file name.
In the present embodiment, the first predetermined encryption algorithm is rivest, shamir, adelman, can such as use MD5, MD4 or MD2
Rivest, shamir, adelman.Specifically, source filename is encrypted with preset characters string according to rivest, shamir, adelman, and it will add
Close result is used as the second new file name.Wherein, preset characters string is user's character string set in advance as needed, to character string
Particular content and the length of character string do not limit.
S230, when first new file name is consistent with second new file name, according to first new file name
Generate decryption key.
Specifically, in network transmission process, i.e., by new file by server transport to client during, new text
Part is easily tampered, therefore the first new file name and the second new file name are compared, and judges the first new file name and second
Whether new file name is consistent.When the first new file name is consistent with the second new file name, illustrate in network transmission process, new text
Part is not tampered with, and new file is the file that client really needs to load, parse or render after decryption.According to the first new file
Name generation decryption key, to realize the decryption to new file, it is preferred that obtain the predeterminated position correspondence of the first new file name
Character string;It regard the corresponding character string of the predeterminated position as decryption key.When the first new file name and the second new file name
When inconsistent, illustrate in network transmission process, new file has been tampered, abandon decryption, parsing to the new file etc. and operate.
S240, using the decryption key new file content is decrypted according to default decipherment algorithm, to obtain
The content of the compiling source file.
Wherein, default decipherment algorithm is the decipherment algorithm corresponding with the second predetermined encryption algorithm.Obtained using S230
The S210 new file contents obtained are decrypted decryption key according to default decipherment algorithm, and regard decrypted result as compiling source
The content of file.
The present embodiment provide a source file acquisition methods, by obtain according to compiling source file generate new file and
It is described to compile the corresponding source filename of source file, wherein the new file includes new file content and the first new file name;By institute
State source filename and preset characters string is encrypted according to the first predetermined encryption algorithm and obtains encrypted result, and the encryption is tied
Fruit is used as the second new file name;It is new according to described first when first new file name is consistent with second new file name
Filename generates decryption key;The new file content is decrypted according to default decipherment algorithm using the decryption key,
To obtain the content of the compiling source file, the decryption of the new file to being generated according to compiling source file is realized, is compiled
The content of source file is translated, is effectively solved and source file is compiled in network transmission process is tampered and compiles source file and download to visitor
The problem of being understood or distorted by third party behind the end of family, it is ensured that the security of client data.
As a preferred scheme of the present embodiment, client is obtained according to the new of compiling source file generation from server
Before file, whether judgement is locally cached with the new file, if local cache has the new file, preferential to read locally
The new file of caching, and the operation such as it is decrypted and parses to it.When not being cached with the new file or client locally
The new file of local cache is parsed when finishing, network request is initiated to server, and downloaded from server end corresponding
The new file and the corresponding source filename of compiling source file generated according to compiling source file, and newly downloaded new file is solved
The operations such as close, parsing.And contrasted the new file of the new file downloaded from server and local cache, judge whether needs
The new file is updated, when the new file and the new file of local cache downloaded from server are completely the same, without updating, when
When the new file and the new file of local cache downloaded from server are inconsistent, the new file is updated, and will be under server
The new file of load updates local to client.Pass through above-mentioned technical proposal so that the local cache file of client is to source document
Part name and source file content carry out obscuring the new file after encryption so that third party can not carry out generation to the file locally cached
Code is understood or file is distorted, and further ensures the security of client data.
Embodiment three
Fig. 3 is the structural representation that a source file provided in an embodiment of the present invention handles source file acquisition module device,
The device includes:Source file acquisition module 310, source filename encrypting module 320, encryption key pair generation module 330, in source file
Hold encrypting module 340 and new file acquisition module 350.
Wherein, the source file acquisition module 310, for obtaining compiling source file, wherein, the compiling source file includes
Source filename and source file content;Source filename encrypting module 320, for by the source filename and preset characters string according to the
One predetermined encryption algorithm, which is encrypted, obtains encrypted result, and regard the encrypted result as new file name;Encryption key pair is generated
Module 330, for according to new file name generation encryption key pair;Source file content-encrypt module 340, for being added using described
The source file content is encrypted key spoon according to the second predetermined encryption algorithm, to obtain new file content;New file is obtained
Modulus block 350, new file is obtained for the new file content to be named with new file name.
Further, the encryption key pair generation module 330, is used for:
Obtain the corresponding character string of predeterminated position of the new file name;
It regard the corresponding character string of the predeterminated position as encryption key pair.
Further, the new file acquisition module 350, is used for:
The new file content is named as to the new files different from the compiling source file format with new file name.
The source file processing unit that the present embodiment is provided, by obtaining compiling source file, wherein, the compiling source document
Part includes source filename and source file content;The source filename and preset characters string are carried out according to the first predetermined encryption algorithm
Encryption obtains encrypted result, and regard the encrypted result as new file name;According to new file name generation encryption key pair;Profit
The source file content is encrypted according to the second predetermined encryption algorithm with the encryption key pair, to obtain new file content;
The new file content is named with new file name and obtains new file, is realized to source filename and source file content
Obscure encryption, obtained special new file, effectively solve in network transmission process compile source file be tampered and compile
Translate source file download to client it is local after understood by third party or the problem of distort, it is ensured that the security of client data.
The source file processing unit that the embodiment of the present invention is provided can perform the source document that any embodiment of the present invention is provided
Part processing method, possesses the corresponding functional module of execution method and beneficial effect.
Example IV
Fig. 4 is the structural representation of source file acquisition device provided in an embodiment of the present invention, and the device includes:Obtain
Module 410, the second new file name acquisition module 420, decryption key generation module 430 and new file content decryption module 440.
Wherein, the acquisition module 410, for obtaining the new file generated according to compiling source file and the compiling source document
The corresponding source filename of part, wherein the new file includes new file content and the first new file name;Second new file name is obtained
Module 420, encryption knot is obtained for the source filename and preset characters string to be encrypted according to the first predetermined encryption algorithm
Really, and using the encrypted result it is used as the second new file name;Decryption key generation module 430, for when first new file
When name is consistent with second new file name, according to first new file name generation decryption key;New file content decrypts mould
Block 440, it is described to obtain for the new file content to be decrypted according to default decipherment algorithm using the decryption key
Compile the content of source file.
Further, the decryption key generation module 430, is used for:
Obtain the corresponding character string of predeterminated position of the first new file name;
It regard the corresponding character string of the predeterminated position as decryption key.
The present embodiment provide a source file acquisition device, by obtain according to compiling source file generate new file and
It is described to compile the corresponding source filename of source file, wherein the new file includes new file content and the first new file name;By institute
State source filename and preset characters string is encrypted according to the first predetermined encryption algorithm and obtains encrypted result, and the encryption is tied
Fruit is used as the second new file name;It is new according to described first when first new file name is consistent with second new file name
Filename generates decryption key;The new file content is decrypted according to default decipherment algorithm using the decryption key,
To obtain the content of the compiling source file, the decryption of the new file to being generated according to compiling source file is realized, is compiled
The content of source file is translated, is effectively solved and source file is compiled in network transmission process is tampered and compiles source file and download to visitor
The problem of being understood or distorted by third party behind the end of family, it is ensured that the security of client data.
The source file acquisition device that the embodiment of the present invention is provided can perform the source document that any embodiment of the present invention is provided
Part acquisition methods, possess the corresponding functional module of execution method and beneficial effect.
Note, above are only presently preferred embodiments of the present invention and institute's application technology principle.It will be appreciated by those skilled in the art that
The invention is not restricted to specific embodiment described here, can carry out for a person skilled in the art it is various it is obvious change,
Readjust and substitute without departing from protection scope of the present invention.Therefore, although the present invention is carried out by above example
It is described in further detail, but the present invention is not limited only to above example, without departing from the inventive concept, also
Other more equivalent embodiments can be included, and the scope of the present invention is determined by scope of the appended claims.
Claims (10)
1. a source file processing method, it is characterised in that including:
Compiling source file is obtained, wherein, the compiling source file includes source filename and source file content;
The source filename and preset characters string are encrypted according to the first predetermined encryption algorithm and obtain encrypted result, and by institute
Encrypted result is stated as new file name;
According to new file name generation encryption key pair;
The source file content is encrypted according to the second predetermined encryption algorithm using the encryption key pair, to obtain new file
Content;
The new file content is named with new file name and obtains new file.
2. according to the method described in claim 1, it is characterised in that described according to new file name generation encryption key pair, bag
Include:
Obtain the corresponding character string of predeterminated position of the new file name;
It regard the corresponding character string of the predeterminated position as encryption key pair.
3. method according to claim 1 or 2, it is characterised in that it is described by the new file content with the new file
Name, which is named, obtains new file, including:
The new file content is named as to the new files different from the compiling source file format with new file name.
4. a source file acquisition methods, it is characterised in that including:
The new file generated according to compiling source file and the corresponding source filename of the compiling source file are obtained, wherein the new text
Part includes new file content and the first new file name;
The source filename and preset characters string are encrypted according to the first predetermined encryption algorithm and obtain encrypted result, and by institute
Encrypted result is stated as the second new file name;
When first new file name is consistent with second new file name, according to first new file name generation decryption key
Spoon;
The new file content is decrypted according to default decipherment algorithm using the decryption key, to obtain the compiling source
The content of file.
5. method according to claim 4, it is characterised in that described according to first new file name generation decryption key
Spoon, including:
Obtain the corresponding character string of predeterminated position of the first new file name;
It regard the corresponding character string of the predeterminated position as decryption key.
6. a source file processing unit, it is characterised in that including:
Source file acquisition module, for obtaining compiling source file, wherein, the compiling source file includes source filename and source file
Content;
Source filename encrypting module, for the source filename and preset characters string to be added according to the first predetermined encryption algorithm
It is close to obtain encrypted result, and it regard the encrypted result as new file name;
Encryption key pair generation module, for according to new file name generation encryption key pair;
Source file content-encrypt module, for being calculated the source file content according to the second predetermined encryption using the encryption key pair
Method is encrypted, to obtain new file content;
New file acquisition module, new file is obtained for the new file content to be named with new file name.
7. device according to claim 6, it is characterised in that the encryption key pair generation module, is used for:
Obtain the corresponding character string of predeterminated position of the new file name;
It regard the corresponding character string of the predeterminated position as encryption key pair.
8. the device according to claim 6 or 7, it is characterised in that the new file acquisition module, is used for:
The new file content is named as to the new files different from the compiling source file format with new file name.
9. a source file acquisition device, it is characterised in that including:
Acquisition module, for obtaining the new file generated according to compiling source file and the corresponding source file of the compiling source file
Name, wherein the new file includes new file content and the first new file name;
Second new file name acquisition module, for the source filename to be entered with preset characters string according to the first predetermined encryption algorithm
Row encryption obtains encrypted result, and regard the encrypted result as the second new file name;
Decryption key generation module, for when first new file name is consistent with second new file name, according to described
First new file name generation decryption key;
New file content decryption module, for being entered the new file content according to default decipherment algorithm using the decryption key
Row decryption, to obtain the content of the compiling source file.
10. device according to claim 9, it is characterised in that the decryption key generation module, is used for:
Obtain the corresponding character string of predeterminated position of the first new file name;
It regard the corresponding character string of the predeterminated position as decryption key.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710346650.5A CN107087004A (en) | 2017-05-17 | 2017-05-17 | Source file processing method and processing device, source file acquisition methods and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710346650.5A CN107087004A (en) | 2017-05-17 | 2017-05-17 | Source file processing method and processing device, source file acquisition methods and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107087004A true CN107087004A (en) | 2017-08-22 |
Family
ID=59608265
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710346650.5A Pending CN107087004A (en) | 2017-05-17 | 2017-05-17 | Source file processing method and processing device, source file acquisition methods and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107087004A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019072110A1 (en) * | 2017-10-11 | 2019-04-18 | 阿里巴巴集团控股有限公司 | Method for generating application program, apparatus, system, device, and medium |
CN110414249A (en) * | 2019-07-24 | 2019-11-05 | Oppo广东移动通信有限公司 | Information processing method, device, storage medium and electronic equipment |
CN112035860A (en) * | 2020-09-03 | 2020-12-04 | 深圳市百富智能新技术有限公司 | File encryption method, terminal, device, equipment and medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1567255A (en) * | 2003-09-02 | 2005-01-19 | 四川大学 | Method for controlling storage and access of security file system |
WO2012148894A2 (en) * | 2011-04-28 | 2012-11-01 | Absio Corporation | Secure data storage |
CN103116728A (en) * | 2012-11-16 | 2013-05-22 | 福建联迪商用设备有限公司 | Methods of program document signing and signature detecting |
CN103441923A (en) * | 2013-08-27 | 2013-12-11 | 北京明朝万达科技有限公司 | Method and device for transmitting safety file based on network application software |
CN106446715A (en) * | 2016-10-11 | 2017-02-22 | 武汉斗鱼网络科技有限公司 | File encryption method and device |
-
2017
- 2017-05-17 CN CN201710346650.5A patent/CN107087004A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1567255A (en) * | 2003-09-02 | 2005-01-19 | 四川大学 | Method for controlling storage and access of security file system |
WO2012148894A2 (en) * | 2011-04-28 | 2012-11-01 | Absio Corporation | Secure data storage |
CN103116728A (en) * | 2012-11-16 | 2013-05-22 | 福建联迪商用设备有限公司 | Methods of program document signing and signature detecting |
CN103441923A (en) * | 2013-08-27 | 2013-12-11 | 北京明朝万达科技有限公司 | Method and device for transmitting safety file based on network application software |
CN106446715A (en) * | 2016-10-11 | 2017-02-22 | 武汉斗鱼网络科技有限公司 | File encryption method and device |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019072110A1 (en) * | 2017-10-11 | 2019-04-18 | 阿里巴巴集团控股有限公司 | Method for generating application program, apparatus, system, device, and medium |
CN110414249A (en) * | 2019-07-24 | 2019-11-05 | Oppo广东移动通信有限公司 | Information processing method, device, storage medium and electronic equipment |
CN110414249B (en) * | 2019-07-24 | 2022-03-25 | Oppo广东移动通信有限公司 | Information processing method, information processing apparatus, storage medium, and electronic device |
CN112035860A (en) * | 2020-09-03 | 2020-12-04 | 深圳市百富智能新技术有限公司 | File encryption method, terminal, device, equipment and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8712041B2 (en) | Content protection apparatus and content encryption and decryption apparatus using white-box encryption table | |
US8171560B2 (en) | Secure content pre-distribution to designated systems | |
CN1522516B (en) | Secure header information for multi-content e-mail | |
US9530011B2 (en) | Method and system for provision of cryptographic services | |
KR100753932B1 (en) | contents encryption method, system and method for providing contents through network using the encryption method | |
EP1515215B1 (en) | Method and apparatus for secure delivery and rights management of digital content by means of document indexing | |
US8473740B2 (en) | Method and system for secured management of online XML document services through structure-preserving asymmetric encryption | |
CN104471913A (en) | Signaling and handling content encryption and rights management in content transport and delivery | |
CN102236757A (en) | Software protection method and system applicable to Android system | |
US20140059341A1 (en) | Creating and accessing encrypted web based content in hybrid applications | |
CN107087004A (en) | Source file processing method and processing device, source file acquisition methods and device | |
CN107533613A (en) | Transplant document format file custom field | |
CN108055356B (en) | Information processing method, server, client and readable storage medium | |
JP2004171367A (en) | Circuit operation simulation device, circuit operation simulation method, circuit operation simulation program, and circuit information decoding program | |
JP2007142504A (en) | Information processing system | |
CN111901287B (en) | Method and device for providing encryption information for light application and intelligent equipment | |
CN111831978A (en) | Method and device for protecting configuration file | |
JP2017021144A (en) | Translation system and translation method | |
CN113301038B (en) | Web end video playing method and device | |
KR101425224B1 (en) | Apparatus and method of decoding firmware for upgrading the firmware | |
CN104866740A (en) | Static analysis preventing method and device for files | |
JP2000221881A (en) | Electronic signature terminal device, electronic signature management device and electronic signature system | |
JP2014522520A (en) | Content disclosure control system | |
KR101520097B1 (en) | Program source code distributing system and method thereof | |
KR102199283B1 (en) | System and method for encrypting application data |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170822 |
|
RJ01 | Rejection of invention patent application after publication |