Decompiling prevention method and device for program and medium
Through a combination of multiple obfuscation technologies and SM4 encryption algorithms, the program source code is processed and encrypted JAR packages are generated, which solves the shortcomings of single prevention measures in the existing technology and achieves a high-security decompilation prevention effect.
Patent Information
- Application Number
- CN202510593656.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-09
- Publication Date
- 2025-08-12
AI Technical Summary
Existing decompilation prevention methods usually only have one prevention measure, and it is difficult to deal with multiple decompilation methods, resulting in reduced security of program source code.
The program source code is processed by combining multiple obfuscation technologies, intermediate code is generated, and encrypted through SM4 symmetric encryption algorithm, multi-layer encryption loading classes are generated, and encrypted JAR packages are finally generated. The decryption key is input by the user during the system operation to ensure security.
It greatly increases the complexity of code obfuscation, improves the security of the code, resists various attack methods, and ensures the security of the decryption key through fast national secret SM4 algorithm encryption, and enhances the decompilation prevention effect.
Smart Images

Figure CN120470567A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and in particular to a method, device, and medium for preventing program decompilation. Background Art
[0002] Currently, existing decompilation tools can easily restore compiled .Class files to source code-level suffix files, which are almost identical to the source code after decompilation, which can cause great security risks to the software.
[0003] In the current decompilation environment, the prevention methods mainly include code obfuscation, Class file encryption, and converting source code files into native code. Although these methods can alleviate the decompilation of programs to a certain extent, they usually only take one method to prevent decompilation and are difficult to cope with different decompilation methods, resulting in an increased probability of program source code being decompiled and a reduced security of source code software. Summary of the Invention
[0004] The embodiments of the present application provide a method, device, and medium for preventing decompilation of a program, which are used to solve the problem that only one method can be used to prevent decompilation and it is difficult to cope with different decompilation methods.
[0005] The embodiments of this application adopt the following technical solutions:
[0006] On the one hand, an embodiment of the present application provides a method for preventing decompilation of a program, the method including: the present application discloses a method, device and medium for preventing decompilation of a program, the method including: determining the target code to be protected in the program source code, and according to the obfuscation logic of the target code, obfuscating the target code and the mixed factor code of the target code to generate an intermediate code, encrypting the intermediate code through the SM4 symmetric encryption algorithm to generate an encrypted Class file, and then hierarchically encrypting the preset loading class to generate a multi-layer encrypted loading class, and finally encapsulating the encrypted Class file, the multi-layer encrypted loading class and the basic class to generate an encrypted JAR package.
[0007] In one example, according to the obfuscation logic of the target code, the target code and the mixed factor code of the target code are obfuscated before generating the intermediate code. The method also includes: obtaining multi-dimensional features of the target code; constructing the pre-trained CodeBERT model as a classifier through transfer learning technology; inputting the multi-dimensional features into the classifier to generate the business type of the target code.
[0008] In one example, after inputting multi-dimensional features into a classifier and generating the business type of a target code, the method further includes: constructing a business obfuscation mapping table through mixing factor types of different business types; determining whether the business type of the target code is unique; when it is not unique, performing a strategy combination on the target code through a multi-strategy fusion algorithm and the weight of each business type to obtain a mixing factor weight for each business type; matching the target code according to the business obfuscation mapping table to obtain the mixing factor type of the target code; matching in an obfuscated code library according to the mixing factor type and the mixing factor weight to obtain a mixing factor code of the target code; when it is unique, matching in an obfuscated code library according to the mixing factor type to obtain a mixing factor code of the target code.
[0009] In one example, after the target code and the mixed factor code of the target code are obfuscated according to the obfuscation logic of the target code to generate the intermediate code, the method also includes: identifying the core business information in the intermediate code through the abstract syntax tree; matching the business type of the intermediate code in the business type semantic library to obtain the contextual semantic obfuscation instructions of the intermediate code; and obfuscating the core business information according to the contextual semantic obfuscation instructions to obtain the obfuscated intermediate code.
[0010] In one example, according to the obfuscation logic of the target code, the target code and the mixed factor code of the target code are obfuscated to generate an intermediate code, specifically including: mixing the target code and the mixed factor code of the target code to obtain a mixed code; replacing the variable names and function names in the mixed code with meaningless character sequences to generate a first obfuscated code; retrieving constant values in the first obfuscated code, performing mathematical transformation on the constant values, and generating a second obfuscated code; inserting invalid code branches, loop obfuscation, and jump obfuscation into the second obfuscated code to generate an intermediate code.
[0011] In one example, the preset loading class is encrypted in layers to generate a multi-layer encrypted loading class, specifically including: iteratively encrypting the preset loading class through a preset encryption algorithm and a preset number of encryption layers, and encoding the decryption key of the previous layer of the current encryption layer into the current encryption layer.
[0012] In one example, after encapsulating the encrypted Class file, multi-layer encrypted loading class and basic class to generate an encrypted JAR package, the method also includes: loading the internal method of the final encryption layer in the multi-layer encryption class into the layer above the final encryption layer according to the decryption key input by the user; decrypting the previous layer using the previous layer decryption key stored in the final encryption layer, and iterating the decryption method until decryption reaches the initial preset loading class.
[0013] In one example, before loading the internal method of the final encryption layer in the multi-layer encryption class into the layer above the final encryption layer based on the decryption key input by the user, the method also includes: reading the decryption key input by the user to determine whether the decryption key is correct; if not, determining whether the number of times the decryption key is input exceeds a preset number of errors; if so, terminating the program according to the preset security mechanism.
[0014] On the other hand, an embodiment of the present application provides a device for preventing decompilation of a program, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any one of the above-mentioned methods for preventing decompilation of a program.
[0015] On the other hand, an embodiment of the present application provides a non-volatile computer storage medium for preventing decompilation of a program, which stores computer-executable instructions that can execute any of the above-mentioned methods for preventing decompilation of a program.
[0016] At least one of the above technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects:
[0017] In terms of code obfuscation, this application adopts an obfuscation method that combines multiple obfuscation technologies. In particular, it can also insert higher-quality obfuscation codes according to different business types, and adopt more reasonable control obfuscation logic, thereby greatly increasing the complexity of the obfuscated code, making it difficult for attackers to crack; in terms of encryption, the national secret SM4 algorithm with high security strength is selected to encrypt Class files. This algorithm can resist various currently known attack methods, and its encryption and decryption speed is faster than other algorithms. At the same time, the decryption key is not directly stored in the system file, but is entered separately by the user when the system is running to ensure the security of the key. In addition, this application also uses layer-by-layer encryption to hide the class loader, further enhancing security. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solution of the present application, some embodiments of the present application will be described in detail below with reference to the accompanying drawings, in which:
[0019] Figure 1 A flowchart of a method for preventing program decompilation provided in an embodiment of the present application;
[0020] Figure 2 A schematic diagram of Class file encryption and decryption for a method for preventing program decompilation provided in an embodiment of the present application;
[0021] Figure 3A schematic diagram of a module implementation flow of a method for preventing program decompilation provided in an embodiment of the present application;
[0022] Figure 4 A schematic diagram of the structure of a device for preventing program decompilation provided in an embodiment of the present application. DETAILED DESCRIPTION
[0023] To make the objectives, technical solutions, and advantages of this application more clear, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0024] Some embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0025] Figure 1 This is a flowchart of a method for preventing program decompilation provided in an embodiment of the present application. This method can be applied to different business areas. Certain input parameters or intermediate results in this process allow for manual intervention and adjustment to help improve accuracy.
[0026] The analysis method involved in the embodiments of the present application can be implemented by a terminal device or a server, and the present application does not impose any special restrictions on this. For ease of understanding and description, the following embodiments are described in detail using a controller as an example.
[0027] It's important to note that obfuscated code, also known as junk instructions, converts computer program code into a functionally equivalent form that's difficult to read and understand. This means the resulting code performs the same functions (semantics) as the original code. While obfuscated code can still be decompiled, the resulting code is extremely difficult to understand and decipher, making it difficult for decompilers to discern the program's true semantics.
[0028] CodeBERT is a pre-trained model designed specifically for programming scenarios. It primarily addresses the cross-modal understanding and generation of code and natural language. Its core goal is to enable the model to understand both code and natural language simultaneously and support interactive tasks between the two.
[0029] Based on this, Figure 1 The process in may include the following steps:
[0030] S101: Determine the target code that requires protection in the program source code.
[0031] It should be noted that in some embodiments of this application, before determining the target code that requires protection within the program source code, it is necessary to first obtain the program source code uploaded by the user. The system then loads and verifies the file type and encoding format to ensure the integrity of the code. The user or the system then automatically identifies the code files containing sensitive information and marks the resource paths that require key protection. The code files corresponding to the marked key protection paths are the target code files. Sensitive information is set based on the needs of the user's project or software.
[0032] S102: Obfuscating the target code and the mixed factor code of the target code according to the obfuscation logic of the target code to generate an intermediate code.
[0033] It should be noted that, in some embodiments of the present application, after the target code is determined, it is necessary to obtain multi-dimensional features of the target code; wherein the multi-dimensional features include static structural features, business semantic features, and behavioral features.
[0034] For the collection of static structural features, the code is parsed through the abstract syntax tree (AST) to extract class inheritance relationships, method call chains, third-party library dependencies (such as Spring, Hibernate and other framework identifiers), and sensitive function signatures; for the collection of business semantic features, natural language processing (NLP) is used to analyze code comments and business keywords in class names / method names (such as "payment", "medical data", and "user authentication"), and combined with domain dictionaries (such as "account" and "transaction" in the financial field, and "medical record" and "diagnosis" in the medical field) to generate semantic vectors; for the collection of behavioral features, the core business logic (such as order generation and logistics tracking in e-commerce scenarios) is identified by dynamically analyzing the API call sequence during code runtime (such as database operations and network requests).
[0035] Furthermore, we employed transfer learning technology to build a classifier based on the pre-trained CodeBERT model. This input takes in the aforementioned multi-dimensional features and outputs the business type (e.g., "financial payment," "medical data processing," "Internet of Things control," etc.) to which the target code belongs. The classifier continuously iterates using historical obfuscation effect data to optimize the accuracy of business type recognition.
[0036] Then, according to the business type of the output target code, a business obfuscation mapping table is constructed by presetting the mixing factor types of different business types; wherein the business obfuscation mapping table includes different mixing factors corresponding to different business types, that is, obfuscation codes.
[0037] The target code's business type is then determined to be unique. If not, the weight of each business type in the target code relative to the total type is obtained. Using a multi-strategy fusion algorithm and the weight of each business type, the target code is combined with a strategy to obtain a mixed factor weight for each business type. For example, if the target code's financial sector accounts for 60% of the total sector and the technology sector accounts for 40% of the total sector, then the mixed factor weight for the target code's financial sector is 60%, and the mixed factor weight for the target code's technology sector is 40%.
[0038] Furthermore, the target code is matched according to the business obfuscation mapping table to obtain the mixing factor type of the target code; and according to the mixing factor type and the mixing factor weight, a matching is performed in a preset obfuscation code library to obtain the mixing factor code of the target code;
[0039] When it is unique, it is matched in the obfuscated code library according to the mixing factor type to obtain the mixing factor code of the target code.
[0040] Furthermore, after obtaining the mixing factor code of the target code, the target code and the mixing factor code of the target code are mixed to obtain a mixed code; then, the variable names and function names in the mixed code are replaced with meaningless character sequences to generate a first obfuscated code, and the constant values in the first obfuscated code are retrieved, and the constant values are mathematically transformed to generate a second obfuscated code, and finally, invalid code branches, loop obfuscation and jump obfuscation are inserted into the second obfuscated code to generate an intermediate code.
[0041] Furthermore, the core business information in the intermediate code is identified through the abstract syntax tree, and the business type of the intermediate code is matched in the business type semantic library to obtain the contextual semantic obfuscation instructions of the intermediate code. Then, according to the contextual semantic obfuscation instructions, the core business information is obfuscated to obtain the obfuscated intermediate code.
[0042] S103: Encrypt the intermediate code using the SM4 symmetric encryption algorithm to generate an encrypted Class file.
[0043] It should be noted that the SM4 algorithm offers high security strength, resisting currently known attack methods. It also operates at a higher speed than AES, enabling faster encryption and decryption. Furthermore, the decryption key is not stored in the system files and must be entered by the user during system operation, ensuring key security.
[0044] S104: performing layered encryption on the preset loading class to generate a multi-layer encrypted loading class; the current encryption layer of the multi-layer encrypted loading class includes the decryption key of the previous layer.
[0045] It should be noted that in some embodiments of the present application, the preset loading class is iteratively encrypted using a preset encryption algorithm and a preset number of encryption layers, and the decryption key of the previous layer of the current encryption layer is encoded into the current encryption layer.
[0046] Specifically: encrypt the original loaded class, such as A0, to generate A1, and hardcode the decryption key of A0 into A1; then encrypt A1 to generate A2, and hardcode the decryption key of A1 into A2; and so on, generate n layers of encrypted A(n), and each layer of encrypted loaded class only contains the decryption key of the next layer.
[0047] S105: Encapsulate the encrypted Class file, the multi-layer encrypted loading class and the basic class to generate an encrypted JAR package.
[0048] It should be noted that, in some embodiments of the present application, after the encrypted Class file, the multi-layer encrypted loading class and the basic class are encapsulated to generate an encrypted JAR package, when decrypting the JAR package, it is first necessary to read the decryption key entered by the user to determine whether the decryption key is correct. If it is not correct, it is determined whether the number of times the decryption key is entered exceeds the preset number of errors. If it exceeds the preset number of errors, the program is terminated according to the preset security mechanism.
[0049] The Class package is then decrypted through reflection. Using the decryption key entered by the user, the internal methods of the final encryption layer in the multi-layered encryption class are loaded into the layer above the final encryption layer. The decryption key of the previous layer stored in the final encryption layer is then used to decrypt the previous layer. The decryption method is then iterated until the original loaded class is decrypted. For example, after loading class A(n), its internal methods are called to dynamically load A(n-1).class. A(n-1) is then decrypted using the key in A(n), generating the executable A(n-1) class. This process is repeated until the original loaded class (A0) is restored.
[0050] It should be noted that although the embodiments of this application are based on Figure 1 Steps S101 to S105 are described in sequence, but this does not mean that steps S101 to S105 must be performed in a strict order. Figure 1 The order shown in FIG1 is to introduce and explain step S101 to step S105 in order to facilitate those skilled in the art to understand the technical solution of the embodiment of the present application. In other words, in the embodiment of the present application, the order between step S101 to step S105 can be appropriately adjusted according to actual needs.
[0051] pass Figure 1The method adopts an obfuscation method that combines multiple obfuscation technologies. In particular, it can also insert higher-quality obfuscation codes according to different business types and adopt more reasonable control obfuscation logic, thereby greatly increasing the complexity of the obfuscated code, making it difficult for attackers to crack; in terms of encryption, the national secret SM4 algorithm with high security strength is selected to encrypt Class files. This algorithm can resist various currently known attack methods, and its encryption and decryption speed is faster than other algorithms. At the same time, the decryption key is not directly stored in the system file, but is entered separately by the user when the system is running to ensure the security of the key. In addition, this application also uses layers of encryption to hide the loaded class, which further enhances security.
[0052] Figure 2 A schematic diagram of Class file encryption and decryption for a method for preventing program decompilation provided in an embodiment of the present application.
[0053] exist Figure 2 The encryption and decryption process of the Class file is shown in Figure 1. Specifically, the Class file is encrypted to generate an encrypted Class file, which is then input into a custom ClassLoader for decryption to obtain the decrypted Class file, which is then loaded into the JVM.
[0054] Figure 3 A schematic diagram of a module implementation flow of a method for preventing program decompilation provided in an embodiment of the present application.
[0055] exist Figure 3 The modules involved include the resource loading module, which is responsible for loading source code resources; the resource selection module, which is responsible for marking the resource paths that need to be protected; the resource compilation obfuscation module, which is responsible for obfuscating the selected code resources during the compilation phase; the resource encryption module, which is responsible for encrypting the compiled Class files and generating the corresponding decryption keys; and the resource encapsulation module, which is responsible for encapsulating the encrypted Class files and the encrypted custom class loader to generate an executable .jar file.
[0056] Figure 4 A schematic diagram of a device for preventing program decompilation provided in an embodiment of the present application includes:
[0057] at least one processor; and,
[0058] a memory communicatively connected to at least one processor; wherein,
[0059] The memory stores instructions that can be executed by at least one processor. The instructions are executed by the at least one processor so that the at least one processor can execute any one of the above-mentioned methods for preventing decompilation of a program.
[0060] Some embodiments of the present application provide a non-volatile computer storage medium for preventing decompilation of a program, which stores computer-executable instructions. The computer-executable instructions can execute any of the above-mentioned methods for preventing decompilation of a program.
[0061] The various embodiments in this application are described in a progressive manner. Similar portions between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the device and medium embodiments are generally similar to the method embodiments, so their descriptions are relatively simple. For relevant portions, refer to the descriptions of the method embodiments.
[0062] The devices and media provided in the embodiments of the present application correspond one-to-one to the methods. Therefore, the devices and media also have similar beneficial technical effects to their corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.
[0063] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0064] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0065] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0066] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0067] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0068] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM), and non-volatile memory such as read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0069] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0070] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0071] The above are merely embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modifications, equivalent replacements, improvements, etc. made within the technical principles of the present application should fall within the scope of protection of the present application.
Claims
1. A method for preventing program decompilation, characterized in that: The method comprises: Identify the object code for which protection is sought in the program source code; According to the obfuscation logic of the target code, the target code and the mixed factor code of the target code are obfuscated to generate an intermediate code; Encrypt the intermediate code using the SM4 symmetric encryption algorithm to generate an encrypted Class file; Performing layered encryption on the preset loading class to generate a multi-layer encrypted loading class; the current encryption layer of the multi-layer encrypted loading class includes the decryption key of the previous layer; The encrypted Class file, the multi-layer encrypted loading class and the basic class are encapsulated to generate an encrypted JAR package.
2. The method according to claim 1, characterized in that Before performing obfuscation processing on the target code and the mixed factor code of the target code according to the obfuscation logic of the target code and generating the intermediate code, the method further includes: Acquiring multi-dimensional features of the target code; The pre-trained CodeBERT model is constructed as a classifier through transfer learning technology; The multi-dimensional features are input into the classifier to generate the business type of the target code.
3. The method according to claim 2, characterized in that After inputting the multi-dimensional features into the classifier to generate the business type of the target code, the method further includes: Construct a business confusion mapping table through the mixing factor types of different business types; Determining whether the business type of the target code is unique; When it is not unique, the target code is strategically combined by a multi-strategy fusion algorithm and the weight of each business type to obtain a hybrid factor weight for each business type; Matching the target code according to the business obfuscation mapping table to obtain a mixing factor type of the target code; Matching the mixing factor type and the mixing factor weight in the obfuscated code library to obtain the mixing factor code of the target code; When it is unique, a matching is performed in the obfuscated code library according to the mixing factor type to obtain the mixing factor code of the target code.
4. The method according to claim 1, wherein After performing obfuscation processing on the target code and the mixed factor code of the target code according to the obfuscation logic of the target code to generate the intermediate code, the method further includes: Identifying core business information in the intermediate code through an abstract syntax tree; Matching the business type of the intermediate code in a business type semantic library to obtain a context semantic obfuscation instruction of the intermediate code; According to the contextual semantic obfuscation instruction, the core business information is obfuscated to obtain an obfuscated intermediate code.
5. The method according to claim 1, wherein The method of performing obfuscation processing on the target code and the mixed factor code of the target code according to the obfuscation logic of the target code to generate the intermediate code specifically includes: Mixing the target code and the mixing factor code of the target code to obtain a mixed code; Replacing variable names and function names in the mixed code with meaningless character sequences to generate a first obfuscated code; Retrieving a constant value in the first obfuscated code, performing a mathematical transformation on the constant value, and generating a second obfuscated code; Invalid code branches, loop obfuscation, and jump obfuscation are inserted into the second obfuscated code to generate an intermediate code.
6. The method according to claim 1, characterized in that The layered encryption of the preset loading class to generate a multi-layer encrypted loading class specifically includes: The preset loaded class is iteratively encrypted using a preset encryption algorithm and a preset number of encryption layers, and the decryption key of the previous layer of the current encryption layer is encoded into the current encryption layer.
7. The method according to claim 1, characterized in that After encapsulating the encrypted Class file, the multi-layer encrypted loading class, and the base class to generate an encrypted JAR package, the method further includes: Loading the internal method of the final encryption layer in the multi-layer encryption class into the layer above the final encryption layer according to the decryption key input by the user; The previous layer is decrypted using the previous layer decryption key stored in the final encryption layer, and the decryption method is iterated until the initial preset loading class is decrypted.
8. The method according to claim 7, characterized in that Before loading the internal method of the final encryption layer in the multi-layer encryption class into the layer above the final encryption layer according to the decryption key input by the user, the method further includes: Read the decryption key input by the user and determine whether the decryption key is correct; If not, determine whether the number of times the decryption key is entered exceeds a preset number of errors; If so, the program will be terminated according to the preset safety mechanism.
9. A device for preventing program from being decompiled, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for preventing decompilation of a program as described in any one of claims 1 to 8.
10. A storage medium for preventing decompilation of a program, storing computer-executable instructions, characterized in that: The computer-executable instructions can execute a method for preventing program decompilation as described in any one of claims 1 to 8.
Citation Information
Cited By
Encryption / decryption method and device, equipment, medium and product
CN121935937A