CN111988132A - Automatic encryption and decryption device, method, equipment and storage medium - Google Patents

Automatic encryption and decryption device, method, equipment and storage medium Download PDF

Info

Publication number
CN111988132A
CN111988132A CN202010794247.0A CN202010794247A CN111988132A CN 111988132 A CN111988132 A CN 111988132A CN 202010794247 A CN202010794247 A CN 202010794247A CN 111988132 A CN111988132 A CN 111988132A
Authority
CN
China
Prior art keywords
encryption
decryption
data
type
encrypted
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
Application number
CN202010794247.0A
Other languages
Chinese (zh)
Inventor
赵青
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Zhongtongji Network Technology Co Ltd
Original Assignee
Shanghai Zhongtongji Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Zhongtongji Network Technology Co Ltd filed Critical Shanghai Zhongtongji Network Technology Co Ltd
Priority to CN202010794247.0A priority Critical patent/CN111988132A/en
Publication of CN111988132A publication Critical patent/CN111988132A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic 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/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network 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
    • H04L63/0478Network 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 applying multiple layers of encryption, e.g. nested tunnels or encrypting the content with a first key and then with at least a second key
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/20Network architectures or network communication protocols for network security for managing network security; network security policies in general

Abstract

The invention relates to an automatic encryption and decryption device, method, equipment and storage medium, the device comprises: the data acquisition unit is configured to acquire a data encryption and decryption request sent by a user and send the data encryption and decryption request to the encryption and decryption unit; the data encryption and decryption request comprises an encryption and decryption type and data to be encrypted and decrypted; the encryption and decryption algorithm storage unit is configured to be used for storing a preset encryption and decryption algorithm; the types of the preset encryption and decryption algorithms are at least two; and the encryption and decryption unit is configured to determine an encryption and decryption type and data to be encrypted and decrypted according to the data encryption and decryption request, call a target encryption and decryption algorithm from the encryption and decryption algorithm storage unit according to the encryption and decryption type, and process the data to be encrypted and decrypted according to the target encryption and decryption algorithm. The automatic encryption and decryption device can support a user to carry out single-layer encryption or multi-layer encryption on confidential data by pre-storing various encryption and decryption algorithms, and meets the requirement that the user needs to carry out multi-layer encryption on the confidential data.

Description

Automatic encryption and decryption device, method, equipment and storage medium
Technical Field
The invention relates to the technical field of data encryption and decryption, in particular to an automatic encryption and decryption device, method, equipment and storage medium.
Background
Data encryption is also called cryptography, and means that plaintext is converted into ciphertext by an encryption algorithm and an encryption key. And the data decryption is to recover the ciphertext into the plaintext through a decryption algorithm and a decryption key. After the data is encrypted, the data can be ensured not to be acquired by other users, and the security of the data is guaranteed.
At present, users mostly adopt data encryption and decryption software to encrypt and decrypt confidential data, the data encryption and decryption software of the related art only supports a single-layer encryption mode, however, in order to prevent the confidential data from being leaked or tampered, the users need to encrypt the confidential data in multiple layers, and therefore the encryption and decryption software of the related art cannot meet the requirements of the users on the multiple-layer encryption.
Disclosure of Invention
In view of the above, in order to solve the problems in the related art to some extent, the present invention provides an automatic encryption and decryption apparatus, method, device and storage medium.
The invention adopts the following technical scheme:
in a first aspect, the present invention provides an automatic encryption and decryption apparatus, including:
the data acquisition unit is configured to acquire a data encryption and decryption request sent by a user and send the data encryption and decryption request to the encryption and decryption unit; the data encryption and decryption request comprises an encryption and decryption type and data to be encrypted and decrypted; the encryption and decryption type is single-layer encryption and decryption or multi-layer encryption and decryption;
the encryption and decryption algorithm storage unit is configured to be used for storing a preset encryption and decryption algorithm; the types of the preset encryption and decryption algorithms are at least two;
the encryption and decryption unit is configured to determine the encryption and decryption type and the data to be encrypted and decrypted according to the data encryption and decryption request, call a target encryption and decryption algorithm from the encryption and decryption algorithm storage unit according to the encryption and decryption type, and process the data to be encrypted and decrypted according to the target encryption and decryption algorithm.
Further, the encryption and decryption algorithm storage unit is also configured to receive and store a user-defined encryption and decryption algorithm uploaded by a user.
Furthermore, the encryption and decryption unit comprises a main thread subunit and a working thread subunit;
the main thread subunit is configured to receive the data encryption and decryption request sent by the data obtaining unit, determine the encryption and decryption type and the data to be encrypted and decrypted according to the data encryption and decryption request, call a target encryption and decryption algorithm from the encryption and decryption algorithm storage unit according to the encryption and decryption type, and send the target encryption and decryption algorithm and the data encryption and decryption request to the working thread subunit;
the working thread subunit is used for processing the data to be encrypted and decrypted according to preset working thread response logic, the target encryption and decryption algorithm and the encryption and decryption type to obtain result data, and sending the result data to the main thread subunit;
and the main thread subunit is also used for receiving the result data according to a preset main thread response logic and putting the result data into a preset memory.
Further, the encryption and decryption algorithm storage unit is further configured to support a user to download the preset encryption and decryption algorithm.
Further, when the encryption/decryption type is multi-layer encryption/decryption, the encryption/decryption unit is specifically configured to:
determining all encryption and decryption modes in the multi-layer encryption and decryption, the encryption and decryption sequence of each encryption and decryption mode and the data to be encrypted and decrypted according to the data encryption and decryption request;
calling the target encryption and decryption algorithm from the encryption and decryption algorithm storage unit according to all the encryption and decryption modes;
and sequentially processing the data to be encrypted and decrypted according to all the encryption and decryption modes and the target encryption and decryption algorithm and the encryption and decryption sequence of each encryption and decryption mode.
In a second aspect, the present invention provides an automatic encryption and decryption method, which is implemented by the automatic encryption and decryption apparatus of the present invention, and the method includes:
the data acquisition unit acquires a data encryption and decryption request sent by a user and sends the data encryption and decryption request to the encryption and decryption unit; the data encryption and decryption request comprises an encryption and decryption type and data to be encrypted and decrypted; the encryption and decryption type is single-layer encryption and decryption or multi-layer encryption and decryption;
the encryption and decryption unit determines the encryption and decryption type and the data to be encrypted and decrypted according to the data encryption and decryption request, calls a target encryption and decryption algorithm from an encryption and decryption algorithm storage unit according to the encryption and decryption type, and processes the data to be encrypted and decrypted according to the target encryption and decryption algorithm; the encryption and decryption algorithm storage unit stores a preset encryption and decryption algorithm; the preset encryption and decryption algorithms have at least two types.
Further, the data acquiring unit acquires a data encryption and decryption request sent by a user, specifically:
the data acquisition unit acquires the encryption and decryption type according to the operation of selecting an encryption and decryption mode by a user; the encryption and decryption mode selection operation is to select a target encryption and decryption type in a preset selection module; the target encryption and decryption type is the single-layer encryption and decryption or the multi-layer encryption and decryption;
the data acquisition unit acquires the data to be encrypted and decrypted sent by a user, and determines the data encryption and decryption request according to the encryption and decryption type and the data to be encrypted and decrypted.
Further, the encryption and decryption type can be customized encryption and decryption;
the data acquisition unit acquires a data encryption and decryption request sent by a user, and specifically comprises the following steps:
the data acquisition unit acquires the encryption and decryption type according to the uploading custom encryption and decryption algorithm operation of the user; the encryption and decryption type is user-defined encryption and decryption;
the data acquisition unit acquires the data to be encrypted and decrypted sent by a user, and determines the data encryption and decryption request according to the encryption and decryption type and the data to be encrypted and decrypted.
In a third aspect, the present invention provides an automatic encryption and decryption apparatus, including:
a processor, and a memory coupled to the processor;
the memory is used for storing a computer program, and the computer program is used for executing the automatic encryption and decryption method;
the processor is used for calling and executing the computer program in the memory.
In a fourth aspect, the present invention provides a storage medium storing a computer program, which when executed by a processor, implements each step in the automatic encryption and decryption method according to the present invention.
By adopting the technical scheme, the invention provides an automatic encryption and decryption device, which comprises: the data acquisition unit is configured to acquire a data encryption and decryption request sent by a user and send the data encryption and decryption request to the encryption and decryption unit; the data encryption and decryption request comprises an encryption and decryption type and data to be encrypted and decrypted; the encryption and decryption type is single-layer encryption and decryption or multi-layer encryption and decryption; the encryption and decryption algorithm storage unit is configured to be used for storing a preset encryption and decryption algorithm; the types of the preset encryption and decryption algorithms are at least two; the encryption and decryption unit is configured to determine the encryption and decryption type and the data to be encrypted and decrypted according to the data encryption and decryption request, call a target encryption and decryption algorithm from the encryption and decryption algorithm storage unit according to the encryption and decryption type, and process the data to be encrypted and decrypted according to the target encryption and decryption algorithm. Based on this, the automatic encryption and decryption device of the application stores multiple encryption and decryption algorithms in advance, so that the automatic encryption and decryption device of the application can support a user to carry out single-layer encryption or multi-layer encryption on confidential data, and the requirement that the user needs to carry out multi-layer encryption on the confidential data is met.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic structural diagram of an automatic encryption and decryption apparatus according to an embodiment of the present invention.
Fig. 2 is a display interface of a display subunit according to an embodiment of the present invention.
Fig. 3 is a schematic flowchart of an automatic encryption and decryption method according to an embodiment of the present invention.
Fig. 4 is a schematic structural diagram of an automatic encryption and decryption device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be described in detail below. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the examples given herein without any inventive step, are within the scope of the present invention.
Fig. 1 is a schematic structural diagram of an automatic encryption and decryption apparatus according to an embodiment of the present invention. As shown in fig. 1, the automatic encryption/decryption apparatus of the present embodiment includes: a data acquisition unit 11, an encryption/decryption algorithm storage unit 12, and an encryption/decryption unit 13.
The data acquisition unit 11 is configured to acquire a data encryption and decryption request sent by a user, and send the data encryption and decryption request to the encryption and decryption unit; the data encryption and decryption request comprises an encryption and decryption type and data to be encrypted and decrypted; the encryption and decryption type is single-layer encryption and decryption or multi-layer encryption and decryption; an encryption/decryption algorithm storage unit 12 configured to store a preset encryption/decryption algorithm; the types of the preset encryption and decryption algorithms are at least two; the encryption and decryption unit 13 is configured to determine the encryption and decryption type and the data to be encrypted and decrypted according to the data encryption and decryption request, call a target encryption and decryption algorithm from the encryption and decryption algorithm storage unit according to the encryption and decryption type, and process the data to be encrypted and decrypted according to the target encryption and decryption algorithm.
Specifically, the data encryption and decryption request is divided into a data encryption request and a data decryption request, the data encryption request includes an encryption type and data to be encrypted, and the data decryption request includes a decryption type and data to be decrypted. The data acquisition unit 11 acquires a data encryption/decryption request sent by a user as a data encryption request or a data decryption request.
The single-layer encryption and decryption is to perform single encryption and decryption on data to be encrypted and decrypted; the multi-layer encryption and decryption is to perform multiple times of encryption and decryption on data to be encrypted and decrypted.
The data acquisition unit 11 includes a display subunit and an acquisition subunit, where the display subunit is configured to display all encryption and decryption modes supported by the automatic encryption and decryption device, acquire an encryption and decryption type sent by a user according to a selection operation of the user, and send the encryption and decryption type to the acquisition subunit. In a specific example, fig. 2 is a display interface of a display subunit according to an embodiment of the present invention. As shown in fig. 2, the display subunit of this embodiment displays multiple encryption modes and multiple decryption modes, a selection box is set before each encryption mode and before each decryption mode, a user selects a corresponding encryption mode or decryption mode by checking the selection box, and when the user selects a certain encryption mode or a certain decryption mode, a check is displayed in the corresponding selection box.
In a specific application process, the display subunit determines the encryption and decryption type sent by the user according to the selection times and the selection sequence of the user, specifically: when the user selects the encryption and decryption mode only once, the display subunit determines the encryption and decryption type sent by the user to be single-layer encryption and decryption according to the selection operation of the user, and the single-layer encryption comprises the encryption and decryption mode selected by the user. And then the display subunit sends the encryption and decryption mode selected by the user to the acquisition subunit. When the user selects the encryption and decryption modes at least twice, the display subunit determines the encryption and decryption type sent by the user to be multilayer encryption and decryption according to the selection operation of the user, and the multilayer encryption comprises all the encryption and decryption modes selected by the user and the selection sequence corresponding to each selected encryption and decryption mode. And then the display subunit sends all the encryption and decryption modes selected by the user and the selected sequence corresponding to each selected encryption and decryption mode to the acquisition subunit.
The acquiring subunit user receives the encryption and decryption type and the data to be encrypted and decrypted sent by the displaying subunit, and sends the encryption and decryption type and the data to be encrypted and decrypted to the encryption and decryption unit 13.
When the encryption/decryption type is single-layer encryption/decryption, the encryption/decryption unit 13 calls a target encryption/decryption algorithm from the encryption/decryption algorithm storage unit 12 according to the encryption/decryption type after determining the encryption/decryption type and the data to be encrypted/decrypted according to the data encryption/decryption request, and then processes the data to be encrypted/decrypted according to the target encryption/decryption algorithm. When the encryption/decryption type is multi-layer encryption/decryption, the encryption/decryption unit 13 first determines all encryption/decryption modes corresponding to multi-layer encryption/decryption, an encryption/decryption sequence corresponding to each encryption/decryption mode, and data to be encrypted/decrypted according to the data encryption/decryption request. And then calls a target encryption/decryption algorithm from the encryption/decryption algorithm storage unit 12 according to the encryption/decryption type (encryption/decryption scheme). And finally, the encryption and decryption unit 13 processes the data to be encrypted and decrypted according to the encryption and decryption sequence corresponding to each encryption and decryption mode according to the target encryption and decryption algorithm.
In a specific example, the data obtaining unit 11 obtains the data encryption and decryption request sent by the user, where the data encryption and decryption request includes multiple layers of encryption and data to be encrypted, where the multiple layers of encryption are to perform MD5 encryption on the data to be encrypted first, and then perform base64 encryption on the data to be encrypted. After receiving the data encryption and decryption request sent by the data acquisition unit 11, the encryption and decryption unit 13 calls a target encryption algorithm corresponding to the MD5 encryption and the base64 encryption from the decryption algorithm storage unit 12 according to the multi-layer encryption, where the target encryption algorithm may be a plurality of encryption algorithms; the data to be encrypted is first MD5 encrypted and then base64 encrypted according to a target encryption algorithm.
By adopting the technical scheme, the invention provides an automatic encryption and decryption device, which comprises: the data acquisition unit is configured to acquire a data encryption and decryption request sent by a user and send the data encryption and decryption request to the encryption and decryption unit; the data encryption and decryption request comprises an encryption and decryption type and data to be encrypted and decrypted; the encryption and decryption type is single-layer encryption and decryption or multi-layer encryption and decryption; the encryption and decryption algorithm storage unit is configured to be used for storing a preset encryption and decryption algorithm; the types of the preset encryption and decryption algorithms are at least two; the encryption and decryption unit is configured to determine the encryption and decryption type and the data to be encrypted and decrypted according to the data encryption and decryption request, call a target encryption and decryption algorithm from the encryption and decryption algorithm storage unit according to the encryption and decryption type, and process the data to be encrypted and decrypted according to the target encryption and decryption algorithm. Based on this, the automatic encryption and decryption device of the application stores multiple encryption and decryption algorithms in advance, so that the automatic encryption and decryption device of the application can support a user to carry out single-layer encryption or multi-layer encryption on confidential data, and the requirement that the user needs to carry out multi-layer encryption on the confidential data is met.
In addition, the automatic encryption and decryption device can provide free combination of various encryption and decryption modes, and achieves the purpose of different types of multilayer encryption and decryption, so that the automatic encryption and decryption device is wider in application scene, can meet various encryption and decryption requirements of users, and is better in user experience.
Further, the encryption and decryption algorithm storage unit 12 is further configured to receive and store the user-defined encryption and decryption algorithm uploaded by the user.
Specifically, the encryption/decryption algorithm storage unit 12 is further configured to receive and store a custom encryption/decryption algorithm uploaded by a user, for example, the encryption/decryption algorithm storage unit 12 is further configured to receive and store a jar packet uploaded by the user. After the encryption and decryption algorithm storage unit 12 receives and stores the user-defined encryption and decryption algorithm uploaded by the user, the automatic encryption and decryption device of the application can process the data to be encrypted and decrypted according to the user-defined encryption and decryption algorithm uploaded by the user, so that the automatic encryption and decryption device of the application can realize more encryption and decryption modes, and can meet the encryption and decryption requirements of the user.
Further, the encryption and decryption unit 13 includes a main thread subunit and a work thread subunit.
The main thread subunit is configured to receive the data encryption and decryption request sent by the data obtaining unit, determine the encryption and decryption type and the data to be encrypted and decrypted according to the data encryption and decryption request, call a target encryption and decryption algorithm from the encryption and decryption algorithm storage unit according to the encryption and decryption type, and send the target encryption and decryption algorithm and the data encryption and decryption request to the worker thread subunit.
And the working thread subunit is used for processing the data to be encrypted and decrypted according to preset working thread response logic, the target encryption and decryption algorithm and the encryption and decryption type to obtain result data, and sending the result data to the main thread subunit.
Specifically, the preset thread response logic may be: and once the working thread subunit monitors the target encryption and decryption algorithm and the data encryption and decryption request sent by the main thread subunit, processing the data to be encrypted and decrypted according to the target encryption and decryption algorithm and the encryption and decryption type to obtain result data, and sending the result data to the main thread subunit.
And the main thread subunit is also used for receiving the result data according to a preset main thread response logic and putting the result data into a preset memory.
Specifically, the preset main thread response logic may be: and once the main thread subunit monitors the result data returned by the working thread subunit, the main thread subunit receives the result data and puts the result data into a preset memory. The preset memory supports the user to download the result data.
Further, the encryption/decryption algorithm storage unit 12 is also configured to support the user to download the preset encryption/decryption algorithm.
Specifically, the encryption and decryption algorithm storage unit 12 is further configured to support a user to download a preset encryption and decryption algorithm and a custom encryption and decryption algorithm that can be directly called after compiling, so that the relevant software can directly use the encryption and decryption algorithm downloaded by the user through the encryption and decryption algorithm storage unit 12, and the functions of the automatic encryption and decryption device of the present application are enriched.
Fig. 3 is a schematic flowchart of an automatic encryption and decryption method according to an embodiment of the present invention. The automatic encryption and decryption method of the embodiment is realized by the automatic encryption and decryption device. As shown in fig. 3, the automatic encryption and decryption method of the present embodiment includes:
s301, a data acquisition unit acquires a data encryption and decryption request sent by a user and sends the data encryption and decryption request to an encryption and decryption unit; the data encryption and decryption request comprises an encryption and decryption type and data to be encrypted and decrypted; the encryption and decryption type is single-layer encryption and decryption or multi-layer encryption and decryption.
S302, the encryption and decryption unit determines the encryption and decryption type and the data to be encrypted and decrypted according to the data encryption and decryption request, calls a target encryption and decryption algorithm from an encryption and decryption algorithm storage unit according to the encryption and decryption type, and processes the data to be encrypted and decrypted according to the target encryption and decryption algorithm; the encryption and decryption algorithm storage unit stores a preset encryption and decryption algorithm; the preset encryption and decryption algorithms have at least two types.
Further, the data acquiring unit acquires a data encryption and decryption request sent by a user, specifically:
the data acquisition unit acquires the encryption and decryption type according to the operation of selecting an encryption and decryption mode by a user; the encryption and decryption mode selection operation is to select a target encryption and decryption type in a preset selection module; the target encryption and decryption type is the single-layer encryption and decryption or the multi-layer encryption and decryption.
The data acquisition unit acquires the data to be encrypted and decrypted sent by a user, and determines the data encryption and decryption request according to the encryption and decryption type and the data to be encrypted and decrypted.
Further, the encryption and decryption type can be customized encryption and decryption.
The data acquisition unit acquires a data encryption and decryption request sent by a user, and specifically comprises the following steps:
the data acquisition unit acquires the encryption and decryption type according to the uploading custom encryption and decryption algorithm operation of the user; the encryption and decryption type is user-defined encryption and decryption.
The data acquisition unit acquires the data to be encrypted and decrypted sent by a user, and determines the data encryption and decryption request according to the encryption and decryption type and the data to be encrypted and decrypted.
The automatic encryption and decryption method is realized through the automatic encryption and decryption device of the embodiment of the application, has corresponding technical characteristics and beneficial effects, and is not repeated herein.
Fig. 4 is a schematic structural diagram of an automatic encryption and decryption device according to an embodiment of the present invention. As shown in fig. 4, the automatic encryption and decryption device of the present embodiment includes:
a processor 410, and a memory 420 coupled to the processor 410.
The memory 420 is used for storing a computer program for executing the automatic encryption and decryption method described herein.
The processor 410 is used to invoke and execute the computer program in the memory 420.
The application also provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the automatic encryption and decryption method are realized.
It is understood that the same or similar parts in the above embodiments may be mutually referred to, and the same or similar parts in other embodiments may be referred to for the content which is not described in detail in some embodiments.
It should be noted that the terms "first," "second," and the like in the description of the present invention are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Further, in the description of the present invention, the meaning of "a plurality" means at least two unless otherwise specified.
Any process or method descriptions in flow diagrams or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and the scope of the preferred embodiments of the present invention includes additional implementations in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present invention.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (10)

1. An automatic encryption/decryption apparatus, comprising:
the data acquisition unit is configured to acquire a data encryption and decryption request sent by a user and send the data encryption and decryption request to the encryption and decryption unit; the data encryption and decryption request comprises an encryption and decryption type and data to be encrypted and decrypted; the encryption and decryption type is single-layer encryption and decryption or multi-layer encryption and decryption;
the encryption and decryption algorithm storage unit is configured to be used for storing a preset encryption and decryption algorithm; the types of the preset encryption and decryption algorithms are at least two;
the encryption and decryption unit is configured to determine the encryption and decryption type and the data to be encrypted and decrypted according to the data encryption and decryption request, call a target encryption and decryption algorithm from the encryption and decryption algorithm storage unit according to the encryption and decryption type, and process the data to be encrypted and decrypted according to the target encryption and decryption algorithm.
2. The automatic encryption and decryption apparatus according to claim 1, wherein the encryption and decryption algorithm storage unit is further configured to receive and store a custom encryption and decryption algorithm uploaded by a user.
3. The automatic encryption and decryption apparatus according to claim 1, wherein the encryption and decryption unit includes a main thread sub-unit and a work thread sub-unit;
the main thread subunit is configured to receive the data encryption and decryption request sent by the data obtaining unit, determine the encryption and decryption type and the data to be encrypted and decrypted according to the data encryption and decryption request, call a target encryption and decryption algorithm from the encryption and decryption algorithm storage unit according to the encryption and decryption type, and send the target encryption and decryption algorithm and the data encryption and decryption request to the working thread subunit;
the working thread subunit is used for processing the data to be encrypted and decrypted according to preset working thread response logic, the target encryption and decryption algorithm and the encryption and decryption type to obtain result data, and sending the result data to the main thread subunit;
and the main thread subunit is also used for receiving the result data according to a preset main thread response logic and putting the result data into a preset memory.
4. The automatic encryption and decryption apparatus according to claim 1, wherein the encryption and decryption algorithm storage unit is further configured to support a user to download the preset encryption and decryption algorithm.
5. The automatic encryption and decryption device of claim 1, wherein when the encryption and decryption type is multi-layer encryption and decryption, the encryption and decryption unit is specifically configured to:
determining all encryption and decryption modes in the multi-layer encryption and decryption, the encryption and decryption sequence of each encryption and decryption mode and the data to be encrypted and decrypted according to the data encryption and decryption request;
calling the target encryption and decryption algorithm from the encryption and decryption algorithm storage unit according to all the encryption and decryption modes;
and sequentially processing the data to be encrypted and decrypted according to all the encryption and decryption modes and the target encryption and decryption algorithm and the encryption and decryption sequence of each encryption and decryption mode.
6. An automatic encryption/decryption method implemented by the automatic encryption/decryption apparatus according to claim 1, comprising:
the data acquisition unit acquires a data encryption and decryption request sent by a user and sends the data encryption and decryption request to the encryption and decryption unit; the data encryption and decryption request comprises an encryption and decryption type and data to be encrypted and decrypted; the encryption and decryption type is single-layer encryption and decryption or multi-layer encryption and decryption;
the encryption and decryption unit determines the encryption and decryption type and the data to be encrypted and decrypted according to the data encryption and decryption request, calls a target encryption and decryption algorithm from an encryption and decryption algorithm storage unit according to the encryption and decryption type, and processes the data to be encrypted and decrypted according to the target encryption and decryption algorithm; the encryption and decryption algorithm storage unit stores a preset encryption and decryption algorithm; the preset encryption and decryption algorithms have at least two types.
7. The automatic encryption and decryption method according to claim 6, wherein the data obtaining unit obtains the data encryption and decryption request sent by the user, specifically:
the data acquisition unit acquires the encryption and decryption type according to the operation of selecting an encryption and decryption mode by a user; the encryption and decryption mode selection operation is to select a target encryption and decryption type in a preset selection module; the target encryption and decryption type is the single-layer encryption and decryption or the multi-layer encryption and decryption;
the data acquisition unit acquires the data to be encrypted and decrypted sent by a user, and determines the data encryption and decryption request according to the encryption and decryption type and the data to be encrypted and decrypted.
8. The automatic encryption and decryption method of claim 6, wherein the encryption and decryption type may be also custom encryption and decryption;
the data acquisition unit acquires a data encryption and decryption request sent by a user, and specifically comprises the following steps:
the data acquisition unit acquires the encryption and decryption type according to the uploading custom encryption and decryption algorithm operation of the user; the encryption and decryption type is user-defined encryption and decryption;
the data acquisition unit acquires the data to be encrypted and decrypted sent by a user, and determines the data encryption and decryption request according to the encryption and decryption type and the data to be encrypted and decrypted.
9. An automatic encryption and decryption apparatus, comprising:
a processor, and a memory coupled to the processor;
the memory is used for storing a computer program used for executing the automatic encryption and decryption method of any one of claims 6 to 8;
the processor is used for calling and executing the computer program in the memory.
10. A storage medium, characterized in that the storage medium stores a computer program which, when executed by a processor, implements the steps in the automatic encryption/decryption method according to any one of claims 6 to 8.
CN202010794247.0A 2020-08-10 2020-08-10 Automatic encryption and decryption device, method, equipment and storage medium Pending CN111988132A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010794247.0A CN111988132A (en) 2020-08-10 2020-08-10 Automatic encryption and decryption device, method, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010794247.0A CN111988132A (en) 2020-08-10 2020-08-10 Automatic encryption and decryption device, method, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111988132A true CN111988132A (en) 2020-11-24

Family

ID=73445328

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010794247.0A Pending CN111988132A (en) 2020-08-10 2020-08-10 Automatic encryption and decryption device, method, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111988132A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102412967A (en) * 2011-09-29 2012-04-11 用友软件股份有限公司 Data transmission system and method
WO2016058487A1 (en) * 2014-10-16 2016-04-21 阿里巴巴集团控股有限公司 Information processing method and apparatus
US20180074975A1 (en) * 2016-09-13 2018-03-15 Intel Corporation Multi-stage memory integrity method and apparatus
CN108197485A (en) * 2018-01-29 2018-06-22 世纪龙信息网络有限责任公司 terminal data encryption method and system, terminal data decryption method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102412967A (en) * 2011-09-29 2012-04-11 用友软件股份有限公司 Data transmission system and method
WO2016058487A1 (en) * 2014-10-16 2016-04-21 阿里巴巴集团控股有限公司 Information processing method and apparatus
US20180074975A1 (en) * 2016-09-13 2018-03-15 Intel Corporation Multi-stage memory integrity method and apparatus
CN108197485A (en) * 2018-01-29 2018-06-22 世纪龙信息网络有限责任公司 terminal data encryption method and system, terminal data decryption method and system

Similar Documents

Publication Publication Date Title
CN110619220B (en) Method and device for encrypting neural network model and storage medium
US10248799B1 (en) Discouraging screen capture
CN107330337B (en) Data storage method and device of hybrid cloud, related equipment and cloud system
US20140372945A1 (en) Method for outputting images, apparatus and mobile terminal therefor
US20150117637A1 (en) System and method for performing a secure cryptographic operation on a mobile device selecting data from multiple sensors
US20200204610A1 (en) Method and apparatus for downloading a file
US10153896B2 (en) Method and device for data encrypting
WO2014209266A1 (en) Collaborative streaming system for protected media
CN111988132A (en) Automatic encryption and decryption device, method, equipment and storage medium
CN111050213B (en) Video playing method and device, electronic equipment and storage medium
WO2016165312A1 (en) Encryption method, decryption method and device therefor
CN106354419A (en) Screenshot control method and device
CN111767550A (en) Data storage method and device
WO2019134278A1 (en) Chat encryption method and apparatus, chat decryption method and apparatus, electronic terminal and readable storage medium
CN113132369A (en) Android mobile phone password automatic filling method and device
JP2013106285A (en) Portable terminal device, encryption key generation method, and program
CN115132305A (en) Data sharing method, data verification method and terminal equipment
CN107085689B (en) Method and device for carrying out encryption protection on picture resources in Flash
CN109933960A (en) Service call control method, service calling method, device and terminal
CN114430343B (en) Data synchronization method and device, electronic equipment and readable storage medium
CN116896444B (en) File packet management method and device
CN113079492B (en) Information sharing method and device
CN116049812B (en) Method for accessing hardware resources and electronic equipment
CN111814159B (en) Picture viewing method, device and system
CN113850633B (en) Information pushing method and device

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20201124