CN110245520A - A kind of file enciphering method, file encryption device and terminal device - Google Patents
A kind of file enciphering method, file encryption device and terminal device Download PDFInfo
- Publication number
- CN110245520A CN110245520A CN201910505828.5A CN201910505828A CN110245520A CN 110245520 A CN110245520 A CN 110245520A CN 201910505828 A CN201910505828 A CN 201910505828A CN 110245520 A CN110245520 A CN 110245520A
- Authority
- CN
- China
- Prior art keywords
- document
- password
- filename
- value
- key
- 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
-
- 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
Abstract
The application is suitable for art file management technology field, provide a kind of file enciphering method, file encryption device and terminal device, include: the access password for the filename and user's input for obtaining document to be processed, and the filename and the access password are merged and generate document key;The document to be processed is encrypted to obtain intermediate document using the document key;Compression processing is carried out to the intermediate document and obtains condensed document, and the condensed document is encrypted to obtain encrypted document using the access password.By the above method, the safety of document is effectively increased.
Description
Technical field
This application involves art file management technology field more particularly to a kind of file enciphering methods, file encryption device and end
End equipment.
Background technique
With the development of information technology, people increasingly pay attention to the safety of information.For example, can during routine office work
Job documentation can be generated, due to being related to action, generally require to encrypt these job documentations.
Currently, being usually that document cipher is directly arranged by user.Such file enciphering method safety is lower, Wu Fayou
Effect guarantees the safety of information in document.
Summary of the invention
In view of this, the embodiment of the present application provides a kind of file enciphering method, file encryption device and terminal device, with
Solve the problems, such as that the safety of file enciphering method in the prior art is lower.
The first aspect of the embodiment of the present application provides a kind of file enciphering method, comprising:
The filename of document to be processed and the access password of user's input are obtained, and the filename and the access is close
Code, which merges, generates document key;
The document to be processed is encrypted to obtain intermediate document using the document key;
Compression processing is carried out to the intermediate document and obtains condensed document, and using the access password to the compression text
Shelves are encrypted to obtain encrypted document.
The second aspect of the embodiment of the present application provides a kind of file encryption device, comprising:
Combining unit, for obtaining the filename of document to be processed and the access password of user's input, and by the file
Name and the access password, which merge, generates document key;
Encryption unit obtains intermediate text for the document to be processed to be encrypted using the document key
Shelves;
Compression unit obtains condensed document for carrying out compression processing to the intermediate document, and close using the access
Code is encrypted to obtain encrypted document to the condensed document.
The third aspect of the embodiment of the present application provides a kind of terminal device, including memory, processor and is stored in
In the memory and the computer program that can run on the processor, when the processor executes the computer program
The step of realizing the method that the embodiment of the present application first aspect provides.
The fourth aspect of the embodiment of the present application provides a kind of computer readable storage medium, the computer-readable storage
Media storage has computer program, and the computer program realizes the embodiment of the present application when being executed by one or more processors
On the one hand the step of the method provided.
Existing beneficial effect is the embodiment of the present application compared with prior art:
The embodiment of the present application is by obtaining the filename of document to be processed and the access password of user's input, and by the text
Part name and the access password, which merge, generates document key, is carried out at encryption using the document key to the document to be processed
Reason obtains intermediate document, by the above method, realizes and encrypts to the first layer of document to be processed, and utilize filename and access
Password, which merges, generates document key, increases the complexity of key;Then compression processing is carried out to the intermediate document to be pressed
Contracting document, and the condensed document is encrypted to obtain encrypted document using the access password, it is realized and is treated with this
Handle the second layer encryption of document.By the above method, double-encryption processing is carried out to document to be processed, has increased document
Safety;Also, filename and access password are merged and generate document key, the complexity of key is increased, further increases
The safety of document.
Detailed description of the invention
It in order to more clearly explain the technical solutions in the embodiments of the present application, below will be to embodiment or description of the prior art
Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only some of the application
Embodiment for those of ordinary skill in the art without any creative labor, can also be according to these
Attached drawing obtains other attached drawings.
Fig. 1 is the implementation process schematic diagram of file enciphering method provided by the embodiments of the present application;
Fig. 2 is the schematic diagram of file encryption device provided by the embodiments of the present application;
Fig. 3 is the schematic diagram of terminal device provided by the embodiments of the present application.
Specific embodiment
In being described below, for illustration and not for limitation, the tool of such as particular system structure, technology etc is proposed
Body details, so as to provide a thorough understanding of the present application embodiment.However, it will be clear to one skilled in the art that there is no these specific
The application also may be implemented in the other embodiments of details.In other situations, it omits to well-known system, device, electricity
The detailed description of road and method, so as not to obscure the description of the present application with unnecessary details.
It should be appreciated that ought use in this specification and in the appended claims, term " includes " instruction is described special
Sign, entirety, step, operation, the presence of element and/or component, but be not precluded one or more of the other feature, entirety, step,
Operation, the presence or addition of element, component and/or its set.
It is also understood that mesh of the term used in this present specification merely for the sake of description specific embodiment
And be not intended to limit the application.As present specification and it is used in the attached claims, unless on
Other situations are hereafter clearly indicated, otherwise " one " of singular, "one" and "the" are intended to include plural form.
It will be further appreciated that the term "and/or" used in present specification and the appended claims is
Refer to any combination and all possible combinations of one or more of associated item listed, and including these combinations.
As used in this specification and in the appended claims, term " if " can be according to context quilt
Be construed to " when ... " or " once " or " in response to determination " or " in response to detecting ".Similarly, phrase " if it is determined that " or
" if detecting [described condition or event] " can be interpreted to mean according to context " once it is determined that " or " in response to true
It is fixed " or " once detecting [described condition or event] " or " in response to detecting [described condition or event] ".
In order to illustrate technical solution described herein, the following is a description of specific embodiments.
Fig. 1 is the implementation process schematic diagram of file enciphering method provided by the embodiments of the present application, as shown, the method
It may comprise steps of:
Step S101 obtains the filename of document to be processed and the access password of user's input, and by the filename and
The access password, which merges, generates document key.
It is in one embodiment, described that the filename and the access password are merged into generation document key, comprising:
The filename is converted into the first machine code according to preset coding rule by S1011, and by the access password
The second machine code is converted into according to preset coding rule.
Machine code is the language for computer identification.
In one embodiment, described that the filename is converted into the first machine code according to preset coding rule, packet
It includes:
The corresponding ASCII value of each character in the filename is obtained respectively.
According to the sequence of character in the filename, ASCII value connection is generated into first machine code.
Illustratively, it is assumed that file is entitled " AB ".The ASCII value for obtaining " A " is 0,100 0001, and the ASCII value of " B " is
0100 0010, according to the sequence of character in filename, it is 0,100 0001 that all ASCII values, which are connected into the first machine code,
0100 0010。
In practical applications, the binary representation of available ASCII value, also 8 systems of available ASCII value, ten
Senary expression, it is not limited here.But once it is determined which kind of expression, when obtaining the ASCII value of each character, is all made of same
A kind of expression.
In addition, the embodiment of the present application, which only encodes ASCII, is used as preset coding rule.In practice, it can also adopt
With other coding rules, it is not specifically limited herein.If replacing the ASCII in the application just with other coding rules
Coding, still falls within the protection scope of the application.
In one embodiment, described to obtain each word in the filename respectively when the character is Chinese character
Accord with corresponding ASCII value, comprising:
The corresponding phonetic of the Chinese character is obtained, and obtains the corresponding ASCII value of each letter in the phonetic respectively.
According to sequence alphabetical in the phonetic, the ASCII value connection of letters all in the phonetic is generated in described
The corresponding ASCII value of Chinese character.
Illustratively, it is assumed that file is entitled " Lee A ", wherein " Lee " is Chinese character, " A " is non-Chinese character.For
" Lee " first obtains its phonetic, i.e. li, then obtains the ASCII value of each letter in " li ", i.e. the ASCII value of " l " is 0100
1100, the ASCII value of " i " is 0,100 1001, and then according to sequence alphabetical in phonetic, " l " is connected with the ASCII value of " i "
It is 0,100 1,100 0,100 1001 at " Lee " corresponding ASCII value.
The ASCII value for obtaining " A " is 0,100 0001.Then according to the sequence of character in filename, by all ASCII values
Connecting into the first machine code is 0,100 0,001 0,100 1,100 0,100 1001.
In this application, the access password is converted into the process of the second machine code according to preset coding rule, with
The process of above-mentioned the first machine code of acquisition is similar, and details are not described herein.
S1012 carries out obscuring processing respectively to first machine code and second machine code, obtain first password because
Son and the second password factor.
Wherein, obscure processing some useless information and useful information is typically referred to merge using certain algorithm
Together, as a result making useful Information hiding between a large amount of useless information.Be essentially belong to one kind of encryption, but
It only realizes hiding, does not carry out algorithm for encryption.First machine code and the second machine code are carried out obscuring processing respectively, are pair
Machine code is protected, and then increases the safety of the document key ultimately produced.
The first password factor and second password factor are merged, generate the document key by S1013.
In one embodiment, described to merge the first password factor and second password factor, it generates
The document key, comprising:
The first password factor and second password factor are linked in sequence, third password factor is generated.
The corresponding cryptographic Hash of the third password factor is calculated according to preset hash function, and calculates the cryptographic Hash
Square value.
The digit of the square value is counted, and obtains N number of number in the square value according to the digit and preset rules
Value is used as the document key, and the N is natural number, and N≤M, M are the digit.
Hash processing, is exactly transformed into the input of random length by hashing algorithm the output of regular length, the output
It is exactly hashed value.This conversion is a kind of compression mapping, it is, the space of hashed value is generally much less than the space inputted, no
Same input may hash to identical output, it is impossible to unique input value is determined from hashed value.Briefly
It is exactly a kind of function of the eap-message digest of the message compression by random length to a certain regular length.In can effectively reducing in this way
Hold space.
Illustratively, it is assumed that cryptographic Hash 111112113, calculated square value are 12345901655324769, totally 17
Position, i.e. M=17 can choose 5 bit value therein as document key, such as choose " 45901 " and are used as document key.
In practice, N number of numerical value can be arbitrarily chosen from square value, can also be selected according to preset rules.
The process of above-mentioned calculating third password factor is also possible to for the first password factor being added with the second password factor
To third password factor;It can also be the first password factor and the second password factor by certain specific calculating (such as function)
Obtain third password factor.
In one embodiment, when the digit is odd number, N is odd number;When the digit is even number, N is even number.
Illustratively, it is assumed that totally 5 bit value, N can be 1 to square value, or 3, or 5.It assumes again that square
Totally 4 bit value, N can be 2 to value, or 4.
In one embodiment, described that the work of N number of numerical value in the square value is obtained according to the digit and preset rules
For the document key, comprising:
Pth position in the square value is obtained to q numerical value as the document key.
Wherein, p-1=M-q, and q-p=N-1, M are the digit.
Illustratively, it is assumed that square value 12598, totally 5 bit value, N=3,.Meet p=2, the q=4 of condition at this time, i.e.,
The 2nd to the 4th numerical value 259 chosen in square value is used as document key.
Assume again that square value is 125876, totally 6 bit value, N=4.Meet p=2, the q=5 of condition at this time, that is, chooses flat
The 2nd to the 5th numerical value 2587 in side's value is used as document key.
It should be noted that a kind of example of above-mentioned only preset rules, that is, choose the N number of numerical value being located among square value
As document key.In practice, other preset rules can also be selected.For example, top n numerical value in square value is chosen, alternatively, choosing
N number of numerical value etc. after selecting in square value.It is not specifically limited herein.
Step S102 is encrypted to obtain intermediate document using the document key to the document to be processed.
Step S103 carries out compression processing to the intermediate document and obtains condensed document, and utilizes the access password pair
The condensed document is encrypted to obtain encrypted document.
Based on the file enciphering method in above-mentioned steps S101-S103, correspondingly, when encrypted document is decrypted,
Need following steps:
S201 first obtains the access password of user's input, is decrypted and is compressed to encrypted document using access password
Document;
S202 carries out decompression processing to condensed document and obtains intermediate document;
S203, merging generation document key using the filename of access password and intermediate document, (method is real with step S101
The step applied in example is identical);
S204 is decrypted intermediate document using document key.
It should be noted which kind of coding rule used in ciphering process, in decrypting process, also using identical
Coding rule;In ciphering process, which kind of preset rules document key is generated using, in decrypting process, still using identical
Preset rules generate document key.
The embodiment of the present application is by obtaining the filename of document to be processed and the access password of user's input, and by the text
Part name and the access password, which merge, generates document key, is carried out at encryption using the document key to the document to be processed
Reason obtains intermediate document, by the above method, realizes and encrypts to the first layer of document to be processed, and utilize filename and access
Password, which merges, generates document key, increases the complexity of key;Then compression processing is carried out to the intermediate document to be pressed
Contracting document, and the condensed document is encrypted to obtain encrypted document using the access password, it is realized and is treated with this
Handle the second layer encryption of document.By the above method, double-encryption processing is carried out to document to be processed, has increased document
Safety;Also, filename and access password are merged and generate document key, the complexity of key is increased, further increases
The safety of document.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process
Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present application constitutes any limit
It is fixed.
Fig. 2 is the schematic diagram of file encryption device provided by the embodiments of the present application, for ease of description, is only shown and this Shen
It please the relevant part of embodiment.
File encryption device shown in Fig. 2 can be the software unit being built in existing terminal device, hardware cell,
Or the unit of soft or hard combination, it can also be used as independent pendant and be integrated into the terminal device, be also used as independent end
End equipment exists.
The file encryption device 2 includes:
Combining unit 21, for obtaining the filename of document to be processed and the access password of user's input, and by the text
Part name and the access password, which merge, generates document key.
Encryption unit 22 obtains intermediate text for the document to be processed to be encrypted using the document key
Shelves.
Compression unit 23 obtains condensed document for carrying out compression processing to the intermediate document, and utilizes the access
Password is encrypted to obtain encrypted document to the condensed document.
Optionally, the combining unit 21 includes:
Conversion module, for the filename to be converted into the first machine code according to preset coding rule, and will be described
It accesses password and is converted into the second machine code according to preset coding rule.
Obscure module, for carrying out obscuring processing respectively to first machine code and second machine code, obtains
One password factor and the second password factor.
Merging module generates the text for merging the first password factor and second password factor
Shelves key.
Optionally, the conversion module includes:
Acquisition submodule, for obtaining the corresponding ASCII value of each character in the filename respectively.
Submodule is connected, for the sequence according to character in the filename, ASCII value connection is generated described the
One machine code.
Optionally, when the character is Chinese character, the acquisition submodule is also used to:
The corresponding phonetic of the Chinese character is obtained, and obtains the corresponding ASCII value of each letter in the phonetic respectively.
According to sequence alphabetical in the phonetic, the ASCII value connection of letters all in the phonetic is generated in described
The corresponding ASCII value of Chinese character.
Optionally, the merging module includes:
Submodule is generated, for the first password factor and second password factor to be linked in sequence, generates third
Password factor.
Computational submodule, for calculating the corresponding cryptographic Hash of the third password factor according to preset hash function, and
Calculate the square value of the cryptographic Hash.
Statistic submodule, for counting the digit of the square value, and according to the digit and preset rules acquisition
N number of numerical value in square value is as the document key, and the N is natural number, and N≤M, M are the digit.
Optionally, when the digit is odd number, N is odd number;When the digit is even number, N is even number.
Optionally, the statistic submodule is also used to:
Pth position in the square value is obtained to q numerical value as the document key.
Wherein, p-1=M-q, and q-p=N-1, M are the digit.
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each function
Can unit, module division progress for example, in practical application, can according to need and by above-mentioned function distribution by different
Functional unit, module are completed, i.e., the internal structure of described device is divided into different functional unit or module, more than completing
The all or part of function of description.Each functional unit in embodiment, module can integrate in one processing unit, can also
To be that each unit physically exists alone, can also be integrated in one unit with two or more units, it is above-mentioned integrated
Unit both can take the form of hardware realization, can also realize in the form of software functional units.In addition, each function list
Member, the specific name of module are also only for convenience of distinguishing each other, the protection scope being not intended to limit this application.Above system
The specific work process of middle unit, module, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
Fig. 3 is the schematic diagram of terminal device provided by the embodiments of the present application.As shown in figure 3, the terminal device 3 of the embodiment
Include: processor 30, memory 31 and is stored in the calculating that can be run in the memory 31 and on the processor 30
Machine program 32.The processor 30 is realized when executing the computer program 32 in above-mentioned each file enciphering method embodiment
Step, such as step S101 to S103 shown in FIG. 1.Alternatively, realization when the processor 30 executes the computer program 32
The function of each module/unit in above-mentioned each Installation practice, such as the function of module 21 to 23 shown in Fig. 2.
Illustratively, the computer program 32 can be divided into one or more module/units, it is one or
Multiple module/units are stored in the memory 31, and are executed by the processor 30, to complete the application.Described one
A or multiple module/units can be the series of computation machine program instruction section that can complete specific function, which is used for
Implementation procedure of the computer program 32 in the terminal device 3 is described.For example, the computer program 32 can be divided
It is cut into combining unit, encryption unit, compression unit, each unit concrete function is as follows:
Combining unit, for obtaining the filename of document to be processed and the access password of user's input, and by the file
Name and the access password, which merge, generates document key.
Encryption unit obtains intermediate text for the document to be processed to be encrypted using the document key
Shelves.
Compression unit obtains condensed document for carrying out compression processing to the intermediate document, and close using the access
Code is encrypted to obtain encrypted document to the condensed document.
Optionally, the combining unit includes:
Conversion module, for the filename to be converted into the first machine code according to preset coding rule, and will be described
It accesses password and is converted into the second machine code according to preset coding rule.
Obscure module, for carrying out obscuring processing respectively to first machine code and second machine code, obtains
One password factor and the second password factor.
Merging module generates the text for merging the first password factor and second password factor
Shelves key.
Optionally, the conversion module includes:
Acquisition submodule, for obtaining the corresponding ASCII value of each character in the filename respectively.
Submodule is connected, for the sequence according to character in the filename, ASCII value connection is generated described the
One machine code.
Optionally, when the character is Chinese character, the acquisition submodule is also used to:
The corresponding phonetic of the Chinese character is obtained, and obtains the corresponding ASCII value of each letter in the phonetic respectively.
According to sequence alphabetical in the phonetic, the ASCII value connection of letters all in the phonetic is generated in described
The corresponding ASCII value of Chinese character.
Optionally, the merging module includes:
Submodule is generated, for the first password factor and second password factor to be linked in sequence, generates third
Password factor.
Computational submodule, for calculating the corresponding cryptographic Hash of the third password factor according to preset hash function, and
Calculate the square value of the cryptographic Hash.
Statistic submodule, for counting the digit of the square value, and according to the digit and preset rules acquisition
N number of numerical value in square value is as the document key, and the N is natural number, and N≤M, M are the digit.
Optionally, when the digit is odd number, N is odd number;When the digit is even number, N is even number.
Optionally, the statistic submodule is also used to:
Pth position in the square value is obtained to q numerical value as the document key.
Wherein, p-1=M-q, and q-p=N-1, M are the digit.
The terminal device 3 can be the calculating such as desktop PC, notebook, palm PC and cloud server and set
It is standby.The terminal device may include, but be not limited only to, processor 30, memory 31.It will be understood by those skilled in the art that Fig. 3
The only example of terminal device 3 does not constitute the restriction to terminal device 3, may include than illustrating more or fewer portions
Part perhaps combines certain components or different components, such as the terminal device can also include input-output equipment, net
Network access device, bus etc..
Alleged processor 30 can be central processing unit (Central Processing Unit, CPU), can also be
Other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit
(Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-
Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic,
Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor
Deng.
The memory 31 can be the internal storage unit of the terminal device 3, such as the hard disk or interior of terminal device 3
It deposits.The memory 31 is also possible to the External memory equipment of the terminal device 3, such as be equipped on the terminal device 3
Plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card dodge
Deposit card (Flash Card) etc..Further, the memory 31 can also both include the storage inside list of the terminal device 3
Member also includes External memory equipment.The memory 31 is for storing needed for the computer program and the terminal device
Other programs and data.The memory 31 can be also used for temporarily storing the data that has exported or will export.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in detail or remembers in some embodiment
The part of load may refer to the associated description of other embodiments.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure
Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually
It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician
Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed
Scope of the present application.
In embodiment provided herein, it should be understood that disclosed device/terminal device and method, it can be with
It realizes by another way.For example, device described above/terminal device embodiment is only schematical, for example, institute
The division of module or unit is stated, only a kind of logical function partition, there may be another division manner in actual implementation, such as
Multiple units or components can be combined or can be integrated into another system, or some features can be ignored or not executed.Separately
A bit, shown or discussed mutual coupling or direct-coupling or communication connection can be through some interfaces, device
Or the INDIRECT COUPLING or communication connection of unit, it can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated module/unit be realized in the form of SFU software functional unit and as independent product sale or
In use, can store in a computer readable storage medium.Based on this understanding, the application realizes above-mentioned implementation
All or part of the process in example method, can also instruct relevant hardware to complete, the meter by computer program
Calculation machine program can be stored in a computer readable storage medium, the computer program when being executed by processor, it can be achieved that on
The step of stating each embodiment of the method.Wherein, the computer program includes computer program code, the computer program generation
Code can be source code form, object identification code form, executable file or certain intermediate forms etc..The computer-readable medium
It may include: any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic that can carry the computer program code
Dish, CD, computer storage, read-only memory (ROM, Read-Only Memory), random access memory (RAM,
Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that described
The content that computer-readable medium includes can carry out increasing appropriate according to the requirement made laws in jurisdiction with patent practice
Subtract, such as in certain jurisdictions, according to legislation and patent practice, computer-readable medium do not include be electric carrier signal and
Telecommunication signal.
Embodiment described above is only to illustrate the technical solution of the application, rather than its limitations;Although referring to aforementioned reality
Example is applied the application is described in detail, those skilled in the art should understand that: it still can be to aforementioned each
Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified
Or replacement, the spirit and scope of each embodiment technical solution of the application that it does not separate the essence of the corresponding technical solution should all
Comprising within the scope of protection of this application.
Claims (10)
1. a kind of file enciphering method characterized by comprising
The filename of document to be processed and the access password of user's input are obtained, and the filename and the access password are closed
And generate document key;
The document to be processed is encrypted to obtain intermediate document using the document key;
Compression processing is carried out to the intermediate document and obtains condensed document, and using the access password to the condensed document into
Row encryption obtains encrypted document.
2. file enciphering method as described in claim 1, which is characterized in that described by the filename and the access password
Merge and generate document key, comprising:
The filename is converted into the first machine code according to preset coding rule, and by the access password according to preset
Coding rule is converted into the second machine code;
First machine code and second machine code are carried out obscuring processing respectively, obtain the first password factor and second close
The code factor;
The first password factor and second password factor are merged, the document key is generated.
3. file enciphering method as claimed in claim 2, which is characterized in that it is described by the filename according to preset coding
Rule is converted into the first machine code, comprising:
The corresponding ASCII value of each character in the filename is obtained respectively;
According to the sequence of character in the filename, ASCII value connection is generated into first machine code.
4. file enciphering method as claimed in claim 3, which is characterized in that when the character is Chinese character, described point
The corresponding ASCII value of each character in the filename is not obtained, comprising:
The corresponding phonetic of the Chinese character is obtained, and obtains the corresponding ASCII value of each letter in the phonetic respectively;
According to sequence alphabetical in the phonetic, the ASCII value connection of letters all in the phonetic is generated into the middle text
Accord with corresponding ASCII value.
5. file enciphering method as claimed in claim 2, which is characterized in that described by the first password factor and described
Two password factors merge, and generate the document key, comprising:
The first password factor and second password factor are linked in sequence, third password factor is generated;
The corresponding cryptographic Hash of the third password factor is calculated according to preset hash function, and calculates square of the cryptographic Hash
Value;
The digit of the square value is counted, and N number of numerical value in the square value is obtained according to the digit and preset rules and is made
For the document key, the N is natural number, and N≤M, M are the digit.
6. file enciphering method as claimed in claim 5, which is characterized in that when the digit is odd number, N is odd number;
When the digit is even number, N is even number.
7. file enciphering method as claimed in claim 6, which is characterized in that described to be obtained according to the digit and preset rules
N number of numerical value in the square value is as the document key, comprising:
Pth position in the square value is obtained to q numerical value as the document key;
Wherein, p-1=M-q, and q-p=N-1, M are the digit.
8. a kind of file encryption device characterized by comprising
Combining unit, for obtaining the filename of document to be processed and the access password of user's input, and by the filename and
The access password, which merges, generates document key;
Encryption unit, for being encrypted to obtain intermediate document to the document to be processed using the document key;
Compression unit obtains condensed document for carrying out compression processing to the intermediate document, and utilizes the access password pair
The condensed document is encrypted to obtain encrypted document.
9. a kind of terminal device, including memory, processor and storage are in the memory and can be on the processor
The computer program of operation, which is characterized in that the processor realizes such as claim 1 to 7 when executing the computer program
The step of any one the method.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists
In when the computer program is executed by processor the step of any one of such as claim 1 to 7 of realization the method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910505828.5A CN110245520A (en) | 2019-06-12 | 2019-06-12 | A kind of file enciphering method, file encryption device and terminal device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910505828.5A CN110245520A (en) | 2019-06-12 | 2019-06-12 | A kind of file enciphering method, file encryption device and terminal device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110245520A true CN110245520A (en) | 2019-09-17 |
Family
ID=67886707
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910505828.5A Pending CN110245520A (en) | 2019-06-12 | 2019-06-12 | A kind of file enciphering method, file encryption device and terminal device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110245520A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112948857A (en) * | 2021-03-03 | 2021-06-11 | 珠海金山办公软件有限公司 | Document processing method and device |
CN117150536A (en) * | 2023-11-01 | 2023-12-01 | 北京敏行通达信息技术有限公司 | Anti-counterfeiting method, device and equipment for document and readable storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102355463A (en) * | 2011-10-10 | 2012-02-15 | 厦门简帛信息科技有限公司 | Digital document encryption method |
US20130177153A1 (en) * | 2007-04-11 | 2013-07-11 | Juniper Networks, Inc. | Using file metadata for data obfuscation |
CN105808278A (en) * | 2014-12-31 | 2016-07-27 | 中国移动通信集团辽宁有限公司 | Client version upgrading method and device |
CN109102247A (en) * | 2018-07-27 | 2018-12-28 | 深圳市元征科技股份有限公司 | Claims Resolution information processing method and block chain node device based on block chain |
CN109547201A (en) * | 2018-12-14 | 2019-03-29 | 平安科技(深圳)有限公司 | A kind of encryption method of root key, computer readable storage medium and terminal device |
-
2019
- 2019-06-12 CN CN201910505828.5A patent/CN110245520A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130177153A1 (en) * | 2007-04-11 | 2013-07-11 | Juniper Networks, Inc. | Using file metadata for data obfuscation |
CN102355463A (en) * | 2011-10-10 | 2012-02-15 | 厦门简帛信息科技有限公司 | Digital document encryption method |
CN105808278A (en) * | 2014-12-31 | 2016-07-27 | 中国移动通信集团辽宁有限公司 | Client version upgrading method and device |
CN109102247A (en) * | 2018-07-27 | 2018-12-28 | 深圳市元征科技股份有限公司 | Claims Resolution information processing method and block chain node device based on block chain |
CN109547201A (en) * | 2018-12-14 | 2019-03-29 | 平安科技(深圳)有限公司 | A kind of encryption method of root key, computer readable storage medium and terminal device |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112948857A (en) * | 2021-03-03 | 2021-06-11 | 珠海金山办公软件有限公司 | Document processing method and device |
CN117150536A (en) * | 2023-11-01 | 2023-12-01 | 北京敏行通达信息技术有限公司 | Anti-counterfeiting method, device and equipment for document and readable storage medium |
CN117150536B (en) * | 2023-11-01 | 2024-01-02 | 北京敏行通达信息技术有限公司 | Anti-counterfeiting method, device and equipment for document and readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107819569B (en) | The encryption method and terminal device of log-on message | |
CN107707347B (en) | User key backup method and device and user key importing method and device | |
JP3014391B2 (en) | Cryptography and cryptographic processor for implementing the method | |
CN107612683B (en) | Encryption and decryption method, device, system, equipment and storage medium | |
CN109547201A (en) | A kind of encryption method of root key, computer readable storage medium and terminal device | |
CN109214201A (en) | A kind of data sharing method, terminal device and computer readable storage medium | |
CN110083606A (en) | Across chain storage method, terminal and storage medium | |
CN107579813A (en) | information encryption and decryption method and device | |
CN111950030A (en) | Data sharing storage method based on block chain, terminal equipment and storage medium | |
CN104052593A (en) | Configurable Key-based Data Shuffling And Encryption | |
CN110489466A (en) | Generation method, device, terminal device and the storage medium of invitation code | |
CN109460667A (en) | Document handling method, system and terminal device in bidding and tendering process | |
CN111191255A (en) | Information encryption processing method, server, terminal, device and storage medium | |
CN106130777A (en) | System safeguarded by a kind of industrial equipment based on cloud computing | |
CN110245520A (en) | A kind of file enciphering method, file encryption device and terminal device | |
CN109409101A (en) | The method and terminal device of data encryption | |
CN102222188A (en) | Information system user password generation method | |
CN109412791B (en) | Key information processing method, device, electronic equipment and computer-readable medium | |
CN107248914B (en) | Novel symmetric encryption system and encryption method on iOS device | |
CN109547203A (en) | A kind of backup method of private key, back-up device and terminal device | |
CN116843349A (en) | Mobile digital medicine marketing platform based on SAAS service | |
CN115758432A (en) | Omnibearing data encryption method and system based on machine learning algorithm | |
CN112559497B (en) | Data processing method, information transmission method, device and electronic equipment | |
CN104298897A (en) | Embedded copyright authentication method based on chaos technology and special processor | |
CN108537038A (en) | Custom rule cipher management method, device, terminal device and storage medium |
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: 20190917 |
|
RJ01 | Rejection of invention patent application after publication |