A license control method and system based on encryption and code obfuscation

By introducing techniques such as name obfuscation, string obfuscation, and bytecode editing into the license control system, combined with the SM2 encryption algorithm, and binding the software logic execution class and the license, the problem of low encryption strength of the RSA signature method is solved, and the security and difficulty of software protection are improved.

CN115510402BActive Publication Date: 2026-05-12SHANDONG EVAYINFO TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANDONG EVAYINFO TECH CO LTD
Filing Date
2022-09-29
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

The existing RSA signature method has low encryption strength in license control systems, making it easy to crack, leading to software abuse and loss of the company's intellectual property.

Method used

It employs methods based on encryption and code obfuscation, including name obfuscation, string obfuscation, junk code and bytecode editing, combined with the SM2 encryption algorithm, and binds the software logic execution class and license to increase the difficulty of decompilation.

Benefits of technology

有效提升了License被破解的难度,降低了软件被滥用的风险,提高了签名效率和安全性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115510402B_ABST
    Figure CN115510402B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of software authorization control, and provides a License control method and system based on encryption and code confusion, which comprises the following steps: obtaining authorization information, and encrypting the authorization information by using a private key to obtain first ciphertext; extracting a software logic running class, encrypting the software logic running class by using the private key after confusion, and obtaining second ciphertext; randomly generating a number, mixing the first ciphertext and the second ciphertext by byte scrambling to obtain a byte array, inserting the number and several bytes of the first ciphertext to obtain a License file; serializing a public key into a first string, splitting the first string into a plurality of substrings, modifying software logic, and enabling different methods to return different substrings according to different entry parameters; converting License loading code in a class loader into a second string, writing the second string into ASM bytecode editing logic, and performing string confusion on the second string; and generating a software package, and sending the software package together with the License file. The possibility of License cracking is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of software license control technology, and in particular relates to a license control method and system based on encryption and code obfuscation. Background Technology

[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.

[0003] With the development of computer technology, the software and information technology service industry is operating well, and all sub-markets in the industry are showing an upward trend. Specifically, the revenue and benefits of software products, information technology services, information security products and embedded system software have maintained rapid growth, and the number of people employed has steadily increased. The industry is accelerating its development towards high quality, the structure is continuously being adjusted and optimized, and new growth points are constantly emerging.

[0004] Software is a crucial asset for software companies and a core part of their technological competitiveness. To protect these software assets and serve customers of all sizes and across various industries, software companies introduce license control systems to achieve this goal.

[0005] like Figure 2 As shown, most commonly used license control systems nowadays use RSA signatures to protect software systems from unauthorized use. However, this method has many weaknesses, such as insufficient RSA key length leading to low encryption strength, and transparent license loading logic, which makes it easy for attackers to bypass the license loading mechanism through decompilation. When the license is cracked and the software is abused, the company's intellectual property will suffer significant losses. Summary of the Invention

[0006] To address the technical problems mentioned above, this invention provides a license control method and system based on encryption and code obfuscation. This method not only binds the software logic execution class to the license, preventing cracking by stripping the license loading logic, but also introduces obfuscation methods such as name obfuscation, string obfuscation, junk code, and bytecode editing, effectively increasing the difficulty of decompilation and reducing the possibility of the license being cracked.

[0007] To achieve the above objectives, the present invention adopts the following technical solution:

[0008] The first aspect of the present invention provides a license control method based on encryption and code obfuscation, comprising:

[0009] Obtain the authorization information and encrypt it using the private key to obtain the first ciphertext;

[0010] Extract the software logic execution class, and after adding junk instructions, performing name obfuscation and string obfuscation, encrypt it with a private key to obtain the second ciphertext;

[0011] A random number is generated. The first ciphertext and the second ciphertext are scrambled and mixed according to the binary arrangement of the randomly generated number to obtain a byte array. The number and a few bytes of the first ciphertext are inserted at the beginning of the byte array to obtain the License file.

[0012] The public key is serialized into a first string, the first string is split into several substrings, and the software logic is modified so that different methods return different substrings based on different input parameters;

[0013] The License loading code in the class loader is converted into a second string, written into the ASM bytecode editing logic, and the second string is obfuscated.

[0014] Based on the obfuscated class loader and the modified software, a software package is generated, and the package and license file are sent together.

[0015] Furthermore, the obfuscated instructions include empty loops, unreachable conditional branches, and return statements for execution.

[0016] Furthermore, the specific method for name obfuscation is to replace the private method names and variable names in the software logic running class with semantically meaningless letters or strings.

[0017] Furthermore, the specific method for string obfuscation is as follows: perform an XOR operation between the string in the software logic running class and the randomly generated string, and save the operation result as a character array and a byte array.

[0018] Furthermore, the class loader can delay loading classes from specified ciphertext data.

[0019] Furthermore, the software package and license file are loaded on the client, specifically through the following steps:

[0020] Several methods are called sequentially to obtain a set of substrings, which are then assembled into the first string and deserialized into a public key.

[0021] Locate the license file; if it is not found, stop the startup process.

[0022] The License file is split to obtain the first and second ciphertexts, which are then decrypted using the public key to obtain the authorization information and the software logic execution class.

[0023] The class loader loads the software logic runtime classes;

[0024] Check the authorization information and control the software based on the authorization information.

[0025] Furthermore, the private key and public key are obtained using the SM2 encryption algorithm.

[0026] A second aspect of the present invention provides a license control system based on encryption and code obfuscation, comprising:

[0027] The first ciphertext generation module is configured to: obtain authorization information and encrypt it using a private key to obtain the first ciphertext;

[0028] The second ciphertext generation module is configured to: extract the software logic execution class, add junk instructions, perform name obfuscation and string obfuscation, and then encrypt it with a private key to obtain the second ciphertext;

[0029] The License file generation module is configured to: randomly generate a number, shuffle and mix the first ciphertext and the second ciphertext according to the binary arrangement of the randomly generated number to obtain a byte array, and insert the number and several bytes of the first ciphertext at the beginning of the byte array to obtain the License file;

[0030] The software logic modification module is configured to: serialize the public key into a first string, split the first string into several substrings, and modify the software logic so that different methods return different substrings based on different input parameters;

[0031] The class loader obfuscation module is configured to: convert the License loading code in the class loader into a second string, write it into the ASM bytecode editing logic, and obfuscate the second string;

[0032] The package generation module is configured to generate a package based on the obfuscated class loader and the modified software, and send the package along with the license file.

[0033] A third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a license control method based on encryption and code obfuscation as described above.

[0034] A fourth aspect of the present invention provides a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of a license control method based on encryption and code obfuscation as described above.

[0035] Compared with the prior art, the beneficial effects of the present invention are:

[0036] This invention provides a license control method based on encryption and code obfuscation, in which the core software logic is bound to the license, thus avoiding cracking by stripping the license loading logic.

[0037] This invention provides a license control method based on encryption and code obfuscation. It introduces obfuscation methods such as name obfuscation, string obfuscation, junk code, and bytecode editing, which effectively increases the difficulty of decompiling and reduces the possibility of the license being cracked.

[0038] This invention provides a license control method based on encryption and code obfuscation, which benefits from the advanced nature of the Chinese national cryptographic SM2 algorithm, improving both signature efficiency and security. Attached Figure Description

[0039] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0040] Figure 1 This is a flowchart of the license loading process under a license control method based on encryption and code obfuscation according to Embodiment 1 of the present invention;

[0041] Figure 2 This is a flowchart of the standard license loading process. Detailed Implementation

[0042] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0043] It should be noted that the following detailed description is illustrative and intended to provide further explanation of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0044] Example 1

[0045] This embodiment provides a license control method based on encryption and code obfuscation. First, authorization information is obtained and encrypted using a private key to obtain a first ciphertext. Then, the software logic execution class is extracted, and after adding junk instructions, performing name obfuscation and string obfuscation, it is encrypted again using the private key to obtain a second ciphertext. Next, a random number is generated, and the first and second ciphertexts are scrambled and mixed according to the binary arrangement of the randomly generated number to obtain a byte array. Several bytes of the number and the length of the first ciphertext are inserted at the beginning of the byte array (the number of bytes inserted at the beginning of the byte array is related to the length of the number's byte array and the length of the first ciphertext's byte array), resulting in a license file. The public key is serialized into a first string, which is then split into several substrings. The software logic is modified so that different methods return different substrings based on different input parameters. The license loading code in the class loader is converted into a second string, written into the ASM bytecode editing logic, and the second string is obfuscated. Finally, based on the obfuscated class loader and the modified software, a software package is generated, and the software package and license file are sent together. Specifically, the method includes the following steps:

[0046] Step 1: Generate SM2 key pair K.

[0047] Step 2: Configure authorization information according to customer type, including customer name (companyName), authorization type (licenseType), expiration time (expireTime), etc., and generate a data file L.

[0048] The data file L generated based on the authorization information is a data format that is easy for the program to parse.

[0049] Data file L typically uses JSON formatting, for example:

[0050]

[0051] Data files L can also use XML format, for example:

[0052] <?xml version="1.0"?>

[0053] <license>

[0054] <data>

[0055] <companyname> Company X< / companyname>

[0056] <licensetype> v1< / licensetype>

[0057] <expiretime> 9999< / expiretime>

[0058] < / data>

[0059] < / license> .

[0060] Step 3: Use SM2 private key K P Encrypt the data file L to obtain the first ciphertext LA.

[0061] Step 4: Extract (select) the key core logic class C1 of the software, and perform the following processing based on the original logic:

[0062] Step 4_1: Add junk instructions to the C1 code that do not affect the original execution logic to prevent it from being decompiled by jd-gui. The main junk instructions used are empty loops (which perform calculations but have no effect on the execution result), unreachable conditional branches (including if and switch branch control statements), and return statements to perform calculations.

[0063] Step 4_2: Replace the private method names and variable names inside the C1 code with semantically meaningless letters or strings, such as "a", "kki", and "tomato", to make it difficult for attackers to infer the logic through the name.

[0064] Step 4_2: Perform an XOR operation between the string in the C1 code and the randomly generated string, and save the result as a character (char) array and a byte (byte) array to achieve string obfuscation and prevent crackers from directly inferring the code logic through the string.

[0065] It should be noted that the core logic runtime class is the foundation for the normal operation of the software. The software cannot run properly without the core logic runtime class. For example, the core logic runtime class is used to operate database read and write. When the core logic runtime class is not loaded, the software cannot read and write to the database normally, or even start up.

[0066] In this embodiment, the core logic execution classes are selected as the database read / write execution class and the permission authentication execution class.

[0067] Step 5: Use SM2 private key K P The class file C1 generated in encryption step 4 yields the second ciphertext B.

[0068] Step 6: Randomly generate a long type number n. Shuffle the first ciphertext LA and the second ciphertext B according to the binary 0 and 1 of the number n to get a byte array arr. Insert the 8 bytes of the number n and 4 bytes of the length of the byte array of the first ciphertext LA at the beginning of arr to get the ciphertext C and write it to the file. The file with ciphertext C is the License file.

[0069] The explanation for shuffling the first ciphertext LA and the second ciphertext B according to the binary 0 and 1 of the number n is as follows: The long type binary has 32 bits, which is inconvenient to elaborate on here. Here, we take the number 147 as an example, whose binary representation is 10010011; assume that the first ciphertext LA is a byte array [121,121] and the second ciphertext B is a byte array [122,108]; assume that, according to the convention, when the binary representation of the number 147 is 1, one byte of the first ciphertext LA is taken, and when it is 0, one byte of the second ciphertext B is taken. The bytes are selected in order, and the final byte array arr is [121,122,108,121].

[0070] The byte array of the number 147 is [0,0,0,0,0,0,0,-109]. The length of the byte array of the first ciphertext LA is 2. The byte array of the number 2 is [0,0,0,2]. After assembling the three byte arrays, we can obtain the byte array [0,0,0,0,0,0,0,-109,0,0,0,2,121,122,108,121], which is the ciphertext C.

[0071] Step 7: Serialize the SM2 public key into the first string S, and process it as follows:

[0072] Step 7_1: The first string S is divided into several substrings S1, S2...Sn in a sequential and uniform manner, and all substrings are represented by S[].

[0073] Step 7_2: In the software code, select the method Mi of the running class Ci, i = 1, 2...n, where n is the number of selected running classes. Modify the code logic so that, based on the original logic, it returns each substring Si generated in 7_1 according to different input parameters.

[0074] Through step 7_2, the substring Si has been embedded into Ci's method Mi and will be directly packaged into the software package. The license loading logic will call these methods Mi one by one to obtain n substrings, and then combine them in order to form the first string S, which is then deserialized into a public key, corresponding to step (2) in the license loading process, which is the inverse operation of step 7.

[0075] In Java, a class can be understood as an abstraction of a real-world entity, containing corresponding attributes and behaviors. For example, suppose a class is an abstraction of a car, named `Car`. Then, brand and model are attributes of the car, while honking the horn and driving are behaviors. These behaviors are called methods within the class. Another example is a `Calculator` class.

[0076]

[0077]

[0078] One method, `plus`, takes two integers, adds them together, and returns the result. For example, a method `M1` takes a user ID as input and returns the user's details from the database; if the user ID is invalid, it throws an exception. This method can be rewritten to throw an exception if the input user ID is a specific number `N1`, indicating that the exception message is one of the split substrings, `S1`. When string `S1` is needed, `M1` is called with the number `N1`, and the exception is caught, thus obtaining string `S1`. The approach to obtaining other substrings `Sn` is the same: increasing the difficulty of cracking the code and preventing attackers from directly obtaining crucial information.

[0079] Step 8: Write a custom class loader and override the loadClass method. The difference between a custom class loader and the native Java class loader is that a custom class loader can delay loading classes into the system from specified ciphertext data (such as ciphertext B).

[0080] The license loading code (license processing code) is converted into a second string LS. Then, the second string LS is obfuscated using the same method as in step 4_2. The obfuscated string is then written into the ASM bytecode editing logic.

[0081] A class loader is a special class that loads classes; the license processing code is a method within that class, but it's obfuscated to increase the difficulty of decompilation. Therefore, when the program starts, the class loader is loaded first. The class loader then performs ASM bytecode editing, loading the obfuscated license processing logic. At this point, the license processing logic can be executed. In other words, the class loader is loaded first, then the license processing code, and finally the license itself.

[0082] The `loadClass` method is specifically written for handling licenses. Java's execution logic is as follows: first, the Java text file is compiled into a bytecode file with the `.class` extension. When a Java program runs, the JVM (Java Virtual Machine) is started, loading the `.class` file into memory to execute various logic. This is Java's default execution process. However, by writing your own class loader, you can allow the program to load classes at the required time and in the required manner. The class loader is also a class, and the method that actually executes the logic for loading classes is named `loadClass`.

[0083] Overriding is a concept in Java, which can be understood as rewriting the original method to execute different logic.

[0084] Step 9: Based on the obfuscated class loader and the modified software, generate a software package, and send the software package and license together to the client for use.

[0085] The software package contains the software runtime code, class loader code, and license loading code.

[0086] The generated software package can be generated either manually or automatically. In the manual case, the user needs to follow the steps and finally package the Java runtime class files (which can be understood as a specially formatted compressed file) into a software package, which is then delivered to the customer along with the license file obtained in step 6. In the automatic case, this process can be completed automatically through pre-written programs, scripts, plugins, etc.

[0087] The packaging process typically uses tools like Maven or Gradle, both commonly used development tools in Java projects. Running these tools generates files with the extensions .jar or .war, generally referred to as JAR or WAR packages, which are essentially software packages.

[0088] like Figure 1 As shown, when a customer uses the product, the license is loaded according to the following steps:

[0089] Step (1): Startup class starts, compiles the obfuscated string in the code into bytecode in real time, and loads the class loader and license loading code into the system.

[0090] Step (2): Call several methods in sequence to obtain a set of strings S[] (substrings), assemble them into the first string S, and deserialize them into an SM2 public key.

[0091] Step (3): Locate the License file in the specified location. If it does not exist, stop the startup process and report an error.

[0092] Step (4): Split the License data to obtain the first ciphertext A and the second ciphertext B. Decrypt them using the SM2 public key to obtain the core runtime class and authorization information. If decryption fails here, stop the startup and report an exception.

[0093] Step (5): Load the core runtime class using a custom class loader.

[0094] Step (6): Check the authorization information and control the software function performance according to the authorization information.

[0095] The software has now started.

[0096] This embodiment provides a license control method based on encryption and code obfuscation, which effectively avoids the situation where the public key is replaced due to plaintext storage. After obfuscation, the effective code obtained after decompiling using common tools such as jd-gui and idea-decompiler is less than 55%. The core software logic is bound to the license, avoiding cracking by stripping the license loading logic.

[0097] Example 2

[0098] This embodiment provides a license control system based on encryption and code obfuscation, which specifically includes the following modules:

[0099] The first ciphertext generation module is configured to: obtain authorization information and encrypt it using a private key to obtain the first ciphertext;

[0100] The second ciphertext generation module is configured to: extract the software logic execution class, add junk instructions, perform name obfuscation and string obfuscation, and then encrypt it with a private key to obtain the second ciphertext;

[0101] The License file generation module is configured to: randomly generate a number, shuffle and mix the first ciphertext and the second ciphertext according to the binary arrangement of the randomly generated number to obtain a byte array, and insert the number and several bytes of the first ciphertext at the beginning of the byte array to obtain the License file;

[0102] The software logic modification module is configured to: serialize the public key into a first string, split the first string into several substrings, and modify the software logic so that different methods return different substrings based on different input parameters;

[0103] The class loader obfuscation module is configured to: convert the License loading code in the class loader into a second string, write it into the ASM bytecode editing logic, and obfuscate the second string;

[0104] The package generation module is configured to generate a package based on the obfuscated class loader and the modified software, and send the package along with the license file.

[0105] It should be noted that each module in this embodiment corresponds one-to-one with each step in Embodiment 1, and their specific implementation processes are the same, so they will not be repeated here.

[0106] Example 3

[0107] This embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of a license control method based on encryption and code obfuscation as described in Embodiment 1 above.

[0108] Example 4

[0109] This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps in the license control method based on encryption and code obfuscation as described in Embodiment 1 above.

[0110] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.

[0111] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations 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, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0112] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0113] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0114] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0115] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A license control method based on encryption and code obfuscation, characterized in that, include: Obtain the authorization information and encrypt it using the private key to obtain the first ciphertext; Extract the software logic execution class, and after adding junk instructions, performing name obfuscation and string obfuscation, encrypt it with a private key to obtain the second ciphertext; A random number is generated. The first ciphertext and the second ciphertext are scrambled and mixed according to the binary arrangement of the randomly generated number to obtain a byte array. The number and a few bytes of the first ciphertext are inserted at the beginning of the byte array to obtain the License file. The public key is serialized into a first string, the first string is split into several substrings, and the software logic is modified so that different methods return different substrings based on different input parameters; The License loading code in the class loader is converted into a second string, written into the ASM bytecode editing logic, and the second string is obfuscated. Based on the obfuscated class loader and the modified software, generate a software package and send the software package and license file together; The software package and license file are loaded on the client. The specific steps are as follows: several methods are called in sequence to obtain a set of substrings, which are assembled into the first string and deserialized into a public key. The system searches for the License file; if it does not exist, the startup process is stopped. The License file is then split to obtain the first and second ciphertexts, which are then decrypted using the public key to obtain the authorization information and the software logic execution class. The class loader loads the software logic runtime classes; Check the authorization information and control the software based on the authorization information.

2. The license control method based on encryption and code obfuscation as described in claim 1, characterized in that, The obfuscated instructions include empty loops, unreachable condition branches, and return statements.

3. The license control method based on encryption and code obfuscation as described in claim 1, characterized in that, The specific method for name obfuscation is to replace the private method names and variable names in the software logic running class with semantically meaningless letters or strings.

4. The license control method based on encryption and code obfuscation as described in claim 1, characterized in that, The specific method for string obfuscation is as follows: perform an XOR operation between the string in the software logic running class and a randomly generated string, and save the result as a character array and a byte array.

5. The license control method based on encryption and code obfuscation as described in claim 1, characterized in that, The class loader can delay loading classes from specified ciphertext data.

6. The license control method based on encryption and code obfuscation as described in claim 1, characterized in that, The private and public keys are obtained using the SM2 encryption algorithm.

7. A license control system based on encryption and code obfuscation, characterized in that, include: The first ciphertext generation module is configured to: obtain authorization information and encrypt it using a private key to obtain the first ciphertext; The second ciphertext generation module is configured to: extract the software logic execution class, add junk instructions, perform name obfuscation and string obfuscation, and then encrypt it with a private key to obtain the second ciphertext; The License file generation module is configured to: randomly generate a number, shuffle and mix the first ciphertext and the second ciphertext according to the binary arrangement of the randomly generated number to obtain a byte array, and insert the number and several bytes of the first ciphertext at the beginning of the byte array to obtain the License file; The software logic modification module is configured to: serialize the public key into a first string, split the first string into several substrings, and modify the software logic so that different methods return different substrings based on different input parameters; The class loader obfuscation module is configured to: convert the License loading code in the class loader into a second string, write it into the ASM bytecode editing logic, and obfuscate the second string; The package generation module is configured to generate a package based on the obfuscated class loader and the modified software, and send the package along with the license file. The software package and license file are loaded on the client. The specific steps are as follows: several methods are called in sequence to obtain a set of substrings, which are assembled into the first string and deserialized into a public key. The system searches for the License file; if it does not exist, the startup process is stopped. The License file is then split to obtain the first and second ciphertexts, which are then decrypted using the public key to obtain the authorization information and the software logic execution class. The class loader loads the software logic runtime classes; Check the authorization information and control the software based on the authorization information.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps in the license control method based on encryption and code obfuscation as described in any one of claims 1-6.

9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the license control method based on encryption and code obfuscation as described in any one of claims 1-6.