|
-
Dec 23rd, 2003, 03:54 AM
#1
Thread Starter
Fanatic Member
how to generate license keys
how to generate license keys (such as the CD keys on the case of most Microsoft software) based on user name ? any idea and or suggestion would be greatly appreaciated and many thanks in advance
Regards
Winanjaya
-
Dec 23rd, 2003, 04:54 AM
#2
Hyperactive Member
There are several software products designed to do that, try a simple google search
-
Dec 23rd, 2003, 10:06 AM
#3
Fanatic Member
i think he meant how to do it through code, so his app can generate the keys - that would be interesting to know how, I woudln't mind hearing it.
-
Dec 23rd, 2003, 10:16 AM
#4
Thread Starter
Fanatic Member
You are right Lithia ... do you have any suggestion for this purpose?
Regards
Winanjaya
-
Dec 23rd, 2003, 11:18 AM
#5
Junior Member
In my understanding, the most common way is to hash the username, and some other piece of qualifying information as the hash key. For example if you wanted the program to be specific to a single computer you can use a username and the HDD #. Alternativly if you wanted it to be a bit more portable you can give a serial number with the product and use that with a username to create the hash.
There are lots of hashing algorithms, MD5 is probably the most popular because it is inpractical to reverse the hashing process (making for good password hashing), but I'd probably stay away from it if you are seriously trying to protect your software, a hacker would likely try it first. I would recomend taking a stab at making up your own algorythim.
Try thise links for more info:
The Secure Hash Algorithm Directory
Google Search
The Code Project Search
reHash (an open source project with lots of hashing algorithms)
That should get you more than started.
-
Jan 7th, 2004, 09:01 PM
#6
New Member
A good way to do this is to get the ASCII value of every character in the Registration Name and then times or divide that number by some other number.
For Example place this in your module and call it with the value you want to encrypt.
VB Code:
Public Function KeyHandler(Un As String)
For xt = 1 To Len(Un)
Ua = Asc(Mid$(Un, xt, 1))
Ua = (Ua / 2) \ 2 + 15
If xt = 1 Then Key2 = (Ua * 20) & "-"
If xt <> 1 Then KeyHandler = KeyHandler + (Ua * A Number)
Next xt
KeyHandler = Key2 & KeyHandler
End Function
The just call it:
if text2.text = KeyHandler(text1.text) then goto OK:
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|