Solved

Registration key

Posted on 1997-05-29
2
234 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to send email in delphi with image 4 586
Rave Reports - Adding a Data Band 1 999
detect keyboard input monitoring 3 391
Delphi Skype API 2 1,759
Note: This is the second blog post in a series on email clearinghouses (https://www.xmatters.com/alert-management/blog-email-has-failed-us?utm_campaign=70138000000ydLoAAI&utm_source=exex&utm_medium=article&utm_content=blog-post).   Every month t…
When we talk about DevOps toolchains, I sometimes wonder how many people really get what we’re talking about. I don’t know if it’s just semantics or tone or something else, but sometimes I think it just sounds like buzzword sausage. So it’s always …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

920 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

16 Experts available now in Live!

Get 1:1 Help Now