Solved

Registration key

Posted on 1997-05-29
2
246 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Getting to know the threat landscape in which DDoS has evolved, and making the right choice to get ourselves geared up to defend against  DDoS attacks effectively. Get the necessary preparation works done and focus on Doing the First Things Right.
The recent Petya-like ransomware attack served a big blow to hundreds of banks, corporations and government offices The Acronis blog takes a closer look at this damaging worm to see what’s behind it – and offers up tips on how you can safeguard your…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

626 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