How to implement license keys for Games?

Blitz3D Forums/Blitz3D Programming/How to implement license keys for Games?

KuRiX2(Posted 2007) [#1]
Hi!

It's been a long time :)

I have a question for all the games we use, and although is not only blitz3D related, i think someone here could help me.

I want to add license keys for my blitz3d games. I would like to have some library in c++ that checks if a key license is valid (i have no problems making a wrapper).

So, i could make a dll so every time the user inputs a key, i can check if it is correct. Of course the library should have some passphrase that i know and that it is used to check the keys.

At first i thought about pre-creating lots of licences, but i think that a key check would be better.

Any ideas are welcomed, and thanks to all :)


6(Posted 2007) [#2]
I thought about keys to, but I want something really simple so I:

1) Don't have to spend to much time on getting the code to work, and..

2) Doesn't frustrate the user by having to go online to validate their key

I'm not creating a C++ lib, but will probably just add a new function to my game code instead. This function will simply read the key string and determine if it is legit by series of math checks. I haven't got the exact detail, but say you had a key such as:

GH3KD94N2K

My function would check to see if, say, the integer values of the 1st, 4th and 8th character = 387, and that the integer value of the 2nd char * 3rd char = 2346.

I'd then just use an excel spreadsheet to generate the keys based on those math rules.


Leon Drake(Posted 2007) [#3]
i usually use some form of encoding that requires and encryption key, then set the key to the registry if its valid and have the prog check for it.

probably not the best method but it works.


Stevie G(Posted 2007) [#4]
Rob posted this is the code archives ... simple and works well.

http://www.blitzbasic.com/codearcs/codearcs.php?code=992


boomboom(Posted 2007) [#5]
Couldn't have picked a better time to ask:

http://www.blitzbasic.com/Community/posts.php?topic=74415


KuRiX2(Posted 2007) [#6]
thanks!, this is more or less what i was looking for :)

I'll give it a try :)