CN105653907B - Generate the method and apparatus of authority - Google Patents
Generate the method and apparatus of authority Download PDFInfo
- Publication number
- CN105653907B CN105653907B CN201511018810.0A CN201511018810A CN105653907B CN 105653907 B CN105653907 B CN 105653907B CN 201511018810 A CN201511018810 A CN 201511018810A CN 105653907 B CN105653907 B CN 105653907B
- Authority
- CN
- China
- Prior art keywords
- character string
- character
- software
- sequence number
- authority
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 34
- 230000008569 process Effects 0.000 claims description 14
- 230000001131 transforming effect Effects 0.000 claims description 6
- 238000004064 recycling Methods 0.000 claims description 2
- 238000010586 diagram Methods 0.000 description 3
- 230000007812 deficiency Effects 0.000 description 2
- PEDCQBHIVMGVHV-UHFFFAOYSA-N Glycerine Chemical compound OCC(O)CO PEDCQBHIVMGVHV-UHFFFAOYSA-N 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 229910002056 binary alloy Inorganic materials 0.000 description 1
- 230000003139 buffering effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000000151 deposition Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/10—Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
- G06F21/12—Protecting executable software
Abstract
A kind of method for generating authority, including:Software information is obtained according to the sequence number of the software;The version information of the software information, the sequence number of the software and the software is generated into the first character string;Part first character string is intercepted since the first character of first character string;Part first character string that interception is replaced with the second character string obtains third character string, and the length of second character string is the equal length of N byte, the length of second character string and part first character string of interception;The character of N+1 character A in the third character string to the third character string in a last character is replaced with into new character successively, obtains the 4th character string;4th character string is saved as into authority.The present invention discloses a kind of device for generating authority.This method and device improve the safety of authority.
Description
Technical field
The present invention relates to software upgrading security technology areas, and in particular to a kind of method and apparatus for generating authority.
Background technology
Authority refers to some application software in order to anti-piracy, a kind of self-protection mode that development company takes.
Sometimes some softwares are expired, if also using, must just use authority.Authority is equivalent to KEY, does not have
KEY, user can not normal use software or can not use software complete function.The generating process of existing authority,
User name input by user, service registration KEY and the hardware information of extraction carry out order change next life when only will be initial
Into authority.The authority of the generation is easy to be cracked.
Invention content
The above-mentioned deficiency for aiming to overcome that the prior art of the embodiment of the present invention provides a kind of side for generating authority
Method can improve the safety of authority.
The another object of the embodiment of the present invention is to overcome the above-mentioned deficiency of the prior art, provides a kind of generation authority
Device, the safety of authority can be improved.
In order to achieve the above-mentioned object of the invention, the technical solution of the embodiment of the present invention is as follows:
A kind of method for generating authority, including:Software information is obtained according to the sequence number of software;The software is believed
The version information of breath, the sequence number of the software and the software generates the first character string;From the first of first character string
A character starts to intercept part first character string;Part first character string that interception is replaced with the second character string obtains
Third character string, the length of second character string are N byte, the length of second character string and the part of interception described the
The equal length of one character string;By N+1 character A in the third character string to the third in a last character
The character of character string replaces with new character successively, obtains the 4th character string;4th character string is saved as into authority.
Further, the process for obtaining the 4th character string includes:By N+1 character A in the third character string
Subscript modulus described in the second character string length N, obtain the first numerical value n;Obtain (n+1)th character of second character string
B;The character B is converted into binary number b;The character A is converted into binary number a;By the binary number b and described
Binary number a carries out step-by-step xor operation, obtains numerical value c;The numerical value c is replaced to N+1 words of the third character string
Accord with A;The cycle above process is replaced until the last character in the third character string.
Further, the software information includes:The type of the sequence number of the software, the sequence number binding of the software
The client that system centre number of nodes, the server node number of sequence number binding of the software, the sequence number of the software are bound
End segment is counted and the upgrading term of validity of the software.
Further, the type of the sequence number of the software includes:Trial edition sequence number, ordinary enterprises version sequence number and advanced
Enterprise version sequence number.
Further:The version information of the software includes the date of software publication.
And a kind of device for generating authority, including:Data obtaining module obtains for the sequence number according to software
Take software information;Text string generation module, for by the version of the sequence number of the software information, the software and the software
Information generates the first character string;Character string interception module, for the interception portion since the first character of first character string
Divide first character string;Character string replacement module, for replacing part first character string of interception with the second character string
Third character string is obtained, the length of second character string is N byte, the length of second character string and the part institute of interception
State the equal length of the first character string;And for by N+1 character A in the third character string to a last word
The character of the third character string in symbol replaces with new character successively, obtains the 4th character string;Authority generation module,
For the 4th character string to be saved as authority.
Further, the character string replacement module includes:Modulus module, for by the N+1 in the third character string
The length N of the second character string, obtains the first numerical value n described in the subscript modulus of position character A;Value module, for obtaining described
(n+1)th character B of two character strings;Binary transforming module, for the character B to be converted to binary number b;It and will
The character A is converted to binary number a;Step-by-step exclusive or module, for the binary number b and binary number a to be carried out
Step-by-step xor operation obtains numerical value c;Character replacement module, for the numerical value c to be replaced to the N+1 of the third character string
Position character A;The modulus module, the value module, the binary transforming module, the step-by-step exclusive or module and the word
Replacement module is accorded with, for recycling the above process until the last character in the third character string is replaced.
Further, the software information includes:The type of the sequence number of the software, the sequence number binding of the software
The client that system centre number of nodes, the server node number of sequence number binding of the software, the sequence number of the software are bound
End segment is counted and the upgrading term of validity of the software.
Further, the type of the sequence number of the software includes:Trial edition sequence number, ordinary enterprises version sequence number and advanced
Enterprise version sequence number.
Further:The version information of the software includes the date of software publication.
The embodiment of the present invention has the beneficial effect that:
1st, the method for the generation authority of the embodiment of the present invention, will be by software during authority is generated
First character string of the generations such as relevant information replaces with the 4th new character string, saves as authority by the 4th character string, carries
The high safety of authority.
2nd, the device of the generation authority of the embodiment of the present invention, will be by software during authority is generated
First character string of the generations such as relevant information replaces with the 4th new character string, saves as authority by the 4th character string, carries
The high safety of authority.
Description of the drawings
Fig. 1 is the flow chart of the method for the generation authority of the embodiment of the present invention;
Fig. 2 is the flow chart of the method for obtaining the 4th character string of the embodiment of the present invention;
Fig. 3 is the structure diagram of the device of the generation authority of the embodiment of the present invention;
Fig. 4 is the structure diagram of the text string generation module of the embodiment of the present invention.
Specific embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, it is right below in conjunction with drawings and examples
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.
An embodiment of the present invention provides a kind of methods for generating authority.This method is applied to network server side.Such as
It is the flow chart of the method for the generation authority of the embodiment of the present invention shown in Fig. 1.The idiographic flow of this method is as follows:
Step S10:Software information is obtained according to the sequence number of software.
Preferably, which includes:The type of sequence number, system centre number of nodes, the sequence number of sequence number binding
The server node number of binding, the client node number of sequence number binding, software the upgrading term of validity.
Wherein, the type of the sequence number includes:Trial edition sequence number, ordinary enterprises version sequence number and high-level enterprise version sequence
Number etc..
The software information can be a variety of combinations at least one of above- mentioned information or above- mentioned information.
When the software includes three system centre, server, client modules simultaneously, then the software information can be simultaneously
The system centre number of nodes of sequence number binding including software, the server node number of sequence number binding of software and the sequence of software
The client node number of row number binding.
The software of one binding sequence number has just been bundled with serial number type, system centre number of nodes, clothes when selling
The information such as business device number of nodes, client node number, the upgrading term of validity, to obtain these information only needs to inquire database.
Step S20:The version information of software information, sequence number and software is generated into the first character string.
Above-mentioned version information includes the date of software publication.The statement of date may be used in the date of software publication
Form is denoted as XXXXXXXX, wherein, first 4 are year, and and then two are the moon, and last two are day.Such as the date of issue of software
Phase is on 2 27th, 2007, then the version information is denoted as 20070227.
The step can be by being written output in a certain order by the version information of software information, sequence number and software
It is obtained in buffering area.The generating process is the state of the art.Output buffer refers to that a fritter of computer is used for depositing
Store up the memory of data.It is of course also possible to these character string informations are not written into output buffer, but with any one piece of memory field
To store and subsequent operation can be done.Can be file below when above-mentioned character string information is written output buffer
Output is prepared.
The character of first character string is number, lowercase a~z and capitalization A~Z.Such as first character string be
1234567。
Step S30:The first character string of part is intercepted since the first character of the first character string.
The length of the first character string of part of interception is unlimited, but the length should be less than the total length of the first character string, and big
In 0.Such as the first character string of part of interception is 1234.
Step S40:The first character string of part that interception is replaced with the second character string obtains third character string.
The length of second character string is N byte.The length of second character string and the first character string of part of interception
Equal length.Second character string is customized character string.The character of second character string is for digital, lowercase a~z and greatly
Write female A~Z.For example, the second character string is customized for 4321, then the length N of the second character string is 4 bytes, replaced
Third character string is 4321567.
Step S50:By N+1 character A in third character string to the word of the third character string in a last character
Symbol replaces with new character successively, obtains the 4th character string.
Wherein, as shown in Fig. 2, step S50 specifically includes following process again:
Step S51:By the length N of the second character string of subscript modulus of N+1 character A in third character string, obtain
First numerical value n.
Lower target meaning in the present invention is:When character A is N+1 characters, N is designated as under character A.
Wherein, the remainder that the result of modulus is the subscript of character A divided by N is obtained.
For example, the length N of the second above-mentioned character string is 4, then the 5th in third character string character A is the 5, the 5th word
4 are designated as under symbol A, the first numerical value n is 0.
Step S52:Obtain (n+1)th character B of the second character string.
For example, when the first numerical value n is 0, then the 1st character B in the second character string 4321 is 4.
Step S53:Character B is converted into binary number b.
For example, when character B is 4, binary number b is 100.
Step S54:Character A is converted into binary number a.
For example, when character A is 5, binary number a is 101.
Step S55:Binary number b and binary number a is subjected to step-by-step xor operation, obtains numerical value c.
For example, above-mentioned when binary number b is 100, binary number a is 101, and the numerical value c obtained after step-by-step xor operation is
101。
Step S56:Numerical value c is replaced to N+1 character A of third character string.
For example, the 5th character A in third character string, i.e. number 5, are replaced by 101.
Step S57:The cycle above process is replaced until the last character in third character string.
For example, for above-mentioned third character string be 4321567, recycle above-mentioned process, then will use step S51~
S56 replaces the character 6 and 7 in third character string successively, then it is as follows specifically to replace result:
It is 1 that 5,5 are designated as under 6th character 6 by 4 modulus to the first numerical value n, and binary number a is 1, the second character string
In the 2nd character B for 3, binary number b is 11, then the numerical value c that step-by-step exclusive or obtains is replaced by 10 for 10, final 6.
6 are designated as under 7th character 7, is 2 by 4 modulus, binary number a is 10, the 3rd word in the second character string
It is 2 to accord with B, and binary number b is 10, then the numerical value c that step-by-step exclusive or obtains is replaced by 10 for 10, final 7.
By above-mentioned replacement process, final third character string 4321567 is replaced by the 4th character string
43211011010。
Step S60:4th character string is saved as into authority.
For example, the 4th character string 43211011010 is saved as into authority, it can be by defeated by the 4th character string
Go out to a null file and preserve to realize.
The process of above-mentioned generation authority will be replaced with newly by the first character string of the generations such as the relevant information of software
The 4th character string, by the 4th text string generation authority, improve the safety of authority.
The embodiment of the present invention additionally provides a kind of device for generating authority.As shown in figure 3, for the embodiment of the present invention
Generate the structure diagram of the device of authority.The device can be network serverless backup, such as cloud service platform.The device
The method that can realize above-mentioned generation authority.The device of the generation authority includes:
Data obtaining module 101, for obtaining software information according to the sequence number of software.
Preferably, which includes:The type of sequence number, system centre number of nodes, the sequence number of sequence number binding
The server node number of binding, the client node number of sequence number binding, software the upgrading term of validity.
Wherein, the type of the sequence number includes:Trial edition sequence number, ordinary enterprises version sequence number and high-level enterprise version sequence
Number etc..
Text string generation module 102, for the version information of the sequence number of software information, software and software to be generated first
Character string.
The version information of software includes the date of software publication.
Character string interception module 103, for intercepting the first character string of part since the first character of the first character string.
Character string replacement module 104, the first character string of part for replacing interception with the second character string obtain third word
Symbol string;And for the character by N+1 character A in third character string to the third character string in a last character
New character is replaced with successively, obtains the 4th character string.
The length of second character string is N byte.The length of the length of second character string and the first character string of part of interception
It spends equal.
As shown in figure 4, the concrete structure of the character string replacement module 104 is as follows:
Modulus module 401, for by the length of the second character string of subscript modulus of N+1 character A in third character string
N is spent, obtains the first numerical value n.
Value module 402, for obtaining (n+1)th character B of the second character string.
Binary transforming module 403, for character B to be converted to binary number b;And character A is converted into binary system
Number a.
Step-by-step exclusive or module 404 for binary number b and binary number a to be carried out step-by-step xor operation, obtains numerical value c.
Character replacement module 405, for numerical value c to be replaced to N+1 character A of third character string.
Above-mentioned modulus module 401, value module 402, binary transforming module 403, step-by-step exclusive or module 404 and character
Replacement module 405 is additionally operable to the cycle above process until the last character in third character string is replaced.
Authority generation module 105, for the 4th character string to be saved as authority.
The device of the generation authority of the embodiment of the present invention, will be by the phase of software during authority is generated
The first character string for closing the generations such as information replaces with the 4th new character string, and authority is saved as by the 4th character string, improves
The safety of authority.
The present invention provides being only presently preferred embodiments of the present invention more than one Suo Shu, not limiting this hair
Bright, all any modification, equivalent and improvement made all within the spirits and principles of the present invention etc. should all be included in the present invention
Protection domain within.
Claims (10)
- A kind of 1. method for generating authority, which is characterized in that including:Software information is obtained according to the sequence number of software;The version information of the software information, the sequence number of the software and the software is generated into the first character string;Part first character string is intercepted since the first character of first character string;Part first character string that interception is replaced with the second character string obtains third character string, the length of second character string Spend the equal length for N byte, the length of second character string and part first character string of interception;By the character of N+1 character A in the third character string to the third character string in a last character according to It is secondary to replace with new character, obtain the 4th character string;4th character string is saved as into authority.
- 2. the method for generation authority as described in claim 1, which is characterized in that described to obtain the process of the 4th character string Including:By the length N of the second character string described in the subscript modulus of N+1 character A in the third character string, first is obtained Numerical value n;Obtain (n+1)th character B of second character string;The character B is converted into binary number b;The character A is converted into binary number a;The binary number b and binary number a is subjected to step-by-step xor operation, obtains numerical value c;The numerical value c is replaced to N+1 character A of the third character string;The cycle above process is replaced until the last character in the third character string.
- 3. the method for generation authority as described in claim 1, which is characterized in that the software information includes:It is described soft The type of the sequence number of part, the sequence number binding of the system centre number of nodes, the software of the sequence number binding of the software Server node number, the client node number of sequence number binding of the software and the upgrading term of validity of the software.
- 4. the method for generation authority as claimed in claim 3, which is characterized in that the type packet of the sequence number of the software It includes:Trial edition sequence number, ordinary enterprises version sequence number and high-level enterprise version sequence number.
- 5. the method for generation authority as described in claim 1, it is characterised in that:The version information of the software includes institute State the date of software publication.
- 6. a kind of device for generating authority, which is characterized in that including:Data obtaining module, for obtaining software information according to the sequence number of software;Text string generation module, for the version information of the sequence number of the software information, the software and the software to be given birth to Into the first character string;Character string interception module, for intercepting part first character since the first character of first character string String;Character string replacement module, part first character string for replacing interception with the second character string obtain third character String, the length of second character string is N byte, the length of second character string and part first character string of interception Equal length;And for by described in N+1 character A in the third character string to a last character The character of three character strings replaces with new character successively, obtains the 4th character string;Authority generation module, for the 4th character string to be saved as authority.
- 7. the device of generation authority as claimed in claim 6, which is characterized in that the character string replacement module includes:Modulus module, for by the length of the second character string described in the subscript modulus of N+1 character A in the third character string N is spent, obtains the first numerical value n;Value module, for obtaining (n+1)th character B of second character string;Binary transforming module, for the character B to be converted to binary number b;And by the character A be converted to two into Number a processed;Step-by-step exclusive or module for the binary number b and binary number a to be carried out step-by-step xor operation, obtains numerical value c;Character replacement module, for the numerical value c to be replaced to N+1 character A of the third character string;The modulus module, the value module, the binary transforming module, the step-by-step exclusive or module and the character replace Block is changed the mold, for recycling the above process until the last character in the third character string is replaced.
- 8. the device of generation authority as claimed in claim 6, which is characterized in that the software information includes:It is described soft The type of the sequence number of part, the sequence number binding of the system centre number of nodes, the software of the sequence number binding of the software Server node number, the client node number of sequence number binding of the software and the upgrading term of validity of the software.
- 9. the device of generation authority as claimed in claim 8, which is characterized in that the type packet of the sequence number of the software It includes:Trial edition sequence number, ordinary enterprises version sequence number and high-level enterprise version sequence number.
- 10. the device of generation authority as claimed in claim 6, it is characterised in that:The version information of the software includes The date of the software publication.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201511018810.0A CN105653907B (en) | 2015-12-30 | 2015-12-30 | Generate the method and apparatus of authority |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201511018810.0A CN105653907B (en) | 2015-12-30 | 2015-12-30 | Generate the method and apparatus of authority |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105653907A CN105653907A (en) | 2016-06-08 |
CN105653907B true CN105653907B (en) | 2018-06-19 |
Family
ID=56478422
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201511018810.0A Active CN105653907B (en) | 2015-12-30 | 2015-12-30 | Generate the method and apparatus of authority |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105653907B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090282484A1 (en) * | 2006-04-13 | 2009-11-12 | Qinetiq Limited | Computer security |
CN101777108A (en) * | 2010-01-22 | 2010-07-14 | 深圳创维数字技术股份有限公司 | Encrypting method capable of executing exe files |
US8145913B1 (en) * | 2011-08-30 | 2012-03-27 | Kaspersky Lab Zao | System and method for password protection |
CN102436439A (en) * | 2010-09-29 | 2012-05-02 | 鸿富锦精密工业(深圳)有限公司 | Text box and text display method |
CN102447558A (en) * | 2011-11-22 | 2012-05-09 | 王勇 | Encryption method using random sequence on-demand and having misleading function |
CN103927463A (en) * | 2014-05-07 | 2014-07-16 | 朱剑锋 | Application software copyright protection system for gateway server |
-
2015
- 2015-12-30 CN CN201511018810.0A patent/CN105653907B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090282484A1 (en) * | 2006-04-13 | 2009-11-12 | Qinetiq Limited | Computer security |
CN101777108A (en) * | 2010-01-22 | 2010-07-14 | 深圳创维数字技术股份有限公司 | Encrypting method capable of executing exe files |
CN102436439A (en) * | 2010-09-29 | 2012-05-02 | 鸿富锦精密工业(深圳)有限公司 | Text box and text display method |
US8145913B1 (en) * | 2011-08-30 | 2012-03-27 | Kaspersky Lab Zao | System and method for password protection |
CN102447558A (en) * | 2011-11-22 | 2012-05-09 | 王勇 | Encryption method using random sequence on-demand and having misleading function |
CN103927463A (en) * | 2014-05-07 | 2014-07-16 | 朱剑锋 | Application software copyright protection system for gateway server |
Also Published As
Publication number | Publication date |
---|---|
CN105653907A (en) | 2016-06-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10778441B2 (en) | Redactable document signatures | |
CN109902086B (en) | Index creation method, device and equipment | |
US20190278758A1 (en) | Data isolation in a blockchain network | |
CN109740317A (en) | A kind of digital finger-print based on block chain deposits card method and device | |
US10592672B2 (en) | Testing insecure computing environments using random data sets generated from characterizations of real data sets | |
TW202405713A (en) | Trustless deterministic state machine | |
US20230074102A1 (en) | Method and apparatus for processing data based on block chain, device and readable storage medium | |
CN106598922B (en) | Character string conversion method and system | |
CN103927338A (en) | Log information storage processing method and log information storage processing device | |
CN109493043A (en) | The blocking method, apparatus of transaction record, electronic equipment and storage medium | |
CN103166911B (en) | A kind of version management server right management method and equipment | |
CN110061843B (en) | Block height creating method, device and equipment in chain type account book | |
CN104021219A (en) | Method and device for generating data template | |
CN110389859A (en) | Method, equipment and computer program product for copied chunks | |
CN110868286A (en) | Method for generating random number based on block chain intelligent contract | |
CN106557307A (en) | The processing method and processing system of business datum | |
AU2015331028A1 (en) | Electronic processing system for electronic document and electronic file | |
CN107247614A (en) | The method that application message is checked in software translating | |
US9853817B2 (en) | Generating enhanced digital signatures for artifacts | |
CN105653932B (en) | The method and apparatus of software upgrading verification | |
CN107979595B (en) | Private data protection method and gateway system | |
CN105677579B (en) | Data access method in caching system and system | |
CN111866134B (en) | Method and system for generating hash value and address of block chain transaction and storage medium | |
JP6685968B2 (en) | Data management system, data management method, and data management program | |
CN105653907B (en) | Generate the method and apparatus of authority |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP01 | Change in the name or title of a patent holder |
Address after: 100041, room 2, building 3, building 30, Xing Xing street, Shijingshan District, Beijing, Patentee after: Beijing Falcon Safety Technology Co., Ltd Address before: 100041, room 2, building 3, building 30, Xing Xing street, Shijingshan District, Beijing, Patentee before: BEIJING KINGSOFT SECURITY MANAGEMENT SYSTEM TECHNOLOGY Co.,Ltd. |
|
CP01 | Change in the name or title of a patent holder |