Field of Invention
The present invention relates to a technical field of software license verifying, and more particularly to a method for verifying a web system license based on multi-way tree search.
Description of Related Arts
After a user buys software, a software system generally restricts functions which can be used by a license. Conventionally, verifying mechanism of software license is as follows:
The method has the following problems:
An object of the present invention is to provide a web system license verifying mechanism, so as to solve problems of the conventional web system that license verifying mechanism is not safe and authorizing granularity is too large.
Accordingly, in order to accomplish the above object, the present invention provides:
The requiring URL is a unique identifier for accessing a certain page of the web system or calling a certain interface of the web system; the requiring URL has a multi-level structure, levels thereof are divided with a semicolon, such as http://xx.xx.xx/a/b/c, wherein http://xx.xx.xx doesn't need to be written in the license, and/a/b/c is similar to a file path structure. For example, a and b are both a type of restricting the certain page or calling the certain interface of the web system.
Encrypting with the asymmetric encryption algorithm comprises encrypting the license with a public key; decrypting with the asymmetric decryption algorithm comprises decrypting the license with a private key, for avoiding faking the license, and avoiding failure of the license verifying mechanism due to losing of any of the keys.
Decrypting the cipher text and sending to the memory comprises decrypting the license in the cipher text into a clear text, and storing the clear text as an object of the memory instead of in a file, for avoid stealing.
Establishing the multi-way tree according to the URL of the authorized function in the license comprises steps of:
Using the requiring URL as the searching value and matching in the multi-way tree comprises steps of:
Advantages of the present invention are as follows:
Referring to drawings, the present invention is further illustrated.
Referring to the drawings, there are several asymmetric encryption algorithms, and the present invention use RSA algorithm.
Firstly, a key value of id/path is written into a License. properties. For example:
Number | Date | Country | Kind |
---|---|---|---|
201410226500.7 | May 2014 | CN | national |
This is a U.S. National Stage under 35 U.S.C 371 of the International Application PCT/CN2014/094354, filed Dec. 19, 2014, which claims priority under 35 U.S.C. 119(a-d) to CN 201410226500.7, filed May 26, 2014.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/CN2014/094354 | 12/19/2014 | WO | 00 |