Solved

Registration key

Posted on 1997-05-29
2
231 Views
Last Modified: 2010-04-16
I am trying to find algorytms to create a Registration
Key system but am having trouble locating this.
Any ideas would be gretly appreciated even the simple ones.
0
Comment
Question by:fatman052997
2 Comments
 
LVL 3

Expert Comment

by:moonlight
ID: 1215343
Don't exactly know what you are looking for,
a search algorithm like binary search,
or keys for dividing data in divided parts,
e.g. the alphabet, if so, what are you trying
to register? and what are the desired function?
(like equally divided..etc)
0
 
LVL 1

Accepted Solution

by:
mrosen earned 100 total points
ID: 1215344
A registration algorithm is pretty easy. Here's a good one (it's a sample):

Generate a random four digit number:
randum := random(10000);
then make it into a string:
str(randnum,randstring);

those first four digits are the first part of the registration key
regstring = randstring;

the remaining digits will be calculated by doing stuff to the digits of that number.
for example, try this

regstring  = regstring + chr(randnum div 30);
regstring  = regstring + chr(randnum div 27);
regstring  = regstring + chr(randnum mod 19);

do this until you have enough digits (I do it like six times)

To check the validity of the registration code in your program, you can do this:

you know the random number, because it's the first four digits of the registration string the user enters in. val it and move it to a variable rannum. Then, check

if (regstring[5] != chr(randnum/30)) then
     it's not registered, so set a variable or something
... do this for each digit.

See. It's pretty cool. If you have any more questions, or want to base the registration number on the name of the customer or something like that, feel free to e-mail me at mrosen@peganet.com.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Use of TCL script on Cisco devices:  - create file and merge it with running configuration to apply configuration changes
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now