• C

Serial Number Needed!

Ah, got your attention.

Yes, I do need one, but for my program.

I would like the serial number to be 3 sets of 2 numbers:

Ex. 12-43-56

I would like each serial to be unique to each machine.

Any small function will do, but something unique and clever. All I come up with was using the computername which has been done a thousand times.

Some rough but working example would be great. I need some ideas to exand on.
LVL 1
edvinsonAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

cwwkieCommented:
> Ah, got your attention.
lol

> I would like each serial to be unique to each machine.

You mean generate something unique based on the hardware or os running on the pc.
You can use a hash based on the MAC address of a network card. Or use the harddisk volume id.
0
WelkinMazeCommented:
Hi,

A serial number of this type will give you just 1000000 possible combinations.
Furthermore, I don't think these kind of codes are very welcomed by the user - what will happen if the user changes his network card or hard drive.
It's highly dependant on the kinf of program you want to protect what protection to use.
But generally in the most cases the efforts for elaborating of a certain protection do not worth themselves. The hackers out there are too good..
It's better to pick up some simple protection mechanism and to put more of your efforts in creating of features of your software that will make the user to want to pay for it.
0
PaulCaswellCommented:
How about using the installation date/time in some form?

Paul
0
Introducing the "443 Security Simplified" Podcast

This new podcast puts you inside the minds of leading white-hat hackers and security researchers. Hosts Marc Laliberte and Corey Nachreiner turn complex security concepts into easily understood and actionable insights on the latest cyber security headlines and trends.

cryptosidCommented:
Have you tried google.com :-)

You could use random number generation functions..

rand() and srand()

http://cplus.about.com/od/cprogrammingtips/l/aa041403a.htm

Regards,
Siddhesh
0
billtouchCommented:
Random numbers won't be unique to the machine. a 6 digit serial number isn't very many numbers. At the very least, create a long number and only use 6 internally - but don't reveal that secret to the world.

And Paul, HDD volume id can be changed by the user. I think you must be referring to the hard drive serial number. That is unique to the drive and cannot be changed (without getting into the drive electronics).

As for terms... serial numbers are usually assigned by the manufacturer in sequence as product is shipped. It usually isn't connected to a machine or installation. What you are probably looking for is an activation or registration number. There would be a lot of use making these tied to some constant value in your computer. Paul's suggestion of HDD serial number (corrected) or MAC address off your ethernet card are theleast changing values in you computer - using those would serve you well.

Bill
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
grg99Commented:
Many many network cards let you change the MAC address from the control panel.

There is no good way of getting a deterministic and unchangeable.

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C

From novice to tech pro — start learning today.