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.