Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Activation Number / Product Code

Status
Not open for further replies.

lashwarj

IS-IT--Management
Nov 1, 2000
1,067
US
How would one go about creating a required activation number in thier program so the user had to enter a number or else the program would not work. The big question is, how could i make all installs have a generator that when the user typed it reconstructed the activation number.

I would have this but I would need it so when the user entered the number it would verify that it was the correct number or activation code for thier name.

Ex. BOB = PWA321
 
lashwarj

Are you talking activation code (as in one-time installation code), or a password everytime the user logs in? Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 

Can you use SYS (2007), or do you need a more complex algorithm?
? SYS (2007,"BOB") && 51749
Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
What does that do mike, i am sorry. I need something like what winzip has. You know you register with them they give you a number that is generated on the characters in your name. (ex. A Key Generator, I have never used one of those hahahahahahahaha)
 
hi

myActivationKey = SYS(2007,myUserName+"ABCDsecretword")

Now save the myActivationKey suitably and verify when you start application.

One more thing, you can also limit the number of users by adding it in the above key. There is an FAQ by me on this. Check in the FAQ area. :)
ramani :)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com

 
Late on the scene as usual....

Can I ask "What exactly is a 'checksum'...."

Second question..

If I have a table with a primary key and I perform a checksum on this primary field such as

sys(2007, patient_id) will this checksum create a unique number ?

Reason for question....

My primary key is

SMITH,JOHN,10/12/1967,A2

Where JOHN SMITH and HIS DATE OF BIRTH ARE OBVIOUS ... and the A2 is a random code generated by the (Mike Gagnon's) GUID program (see FAQs)

Will the checksum be unique, or is there a chance that

FRANKENSTEIN,IGOR, 01/01/1900,ZS (Or some other name, date, GUID combination) will be the same ?

Late as always

Foxy


 
John

Can I ask "What exactly is a 'checksum'...."

A checksum algorithm is normally used to verify the validity of a value. For example SYS(2007) is sometimes used in login schemes as a way to store the checksum value of a password instead of the actual password for security reasons (If someone decides to open the password table all they will see are numeric values).

Another example would be in a credit card scannong application, you might use a checksum algorithm to verify the validity of a credit card number where certain patterns are expected in a credit card number (ie: fifth character is expected to be a "-").

Will the checksum be unique,

But in your case I'm not sure what using sys(2007) would give you. Probably unique, but since it seems to always return 5 digits, I assume more intensive testing might be required to determine it's limitations. Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Thanks Mike

The Checksum is NOT UNIQUE .. I ran it over my data of 9000 files and within a few entries had several duplicates.

I think the writing was on the wall with only 5 digits.. = 10,000 or so options... not like a GUID

I will stick to using it for password verification...

Thanks again

John
 
Mike,
SYS(2007) gives a CRC16 checksum, so it can only return values from 0 -> 65,535 (0xFFFF). In VFP 8.0, you now have the option to use a CDC32 checksum - it returns 0 -> 4,294,967,295 (0xFFFFFFFF).

Rick


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top