Re: Creating unique, non-reproducible serial ID
From: David Cressey <david_at_dcressey.com>
Date: Fri, 09 Mar 2001 04:38:46 GMT
Message-ID: <q7Zp6.36343$2X4.135676_at_petpeeve.ziplink.net>
Date: Fri, 09 Mar 2001 04:38:46 GMT
Message-ID: <q7Zp6.36343$2X4.135676_at_petpeeve.ziplink.net>
Nior,
> I'm looking for an algorithm to create a serial ID that I can give to
users,
> encrypted in a away that they will not be able to recreate other serial
IDs.
Here's an old method:
Use a sequence generator to generate sequential 12 digit ID's. Use a CRC type hashing algorithm to generate a 4 digit hash. The hashing function could have a built in private key, in order to make the hashing function harder to crack.
Concatenate the 12 digit serial id with the 4 digit hash function to produce a 16 digit id.
The chances of generating a correct key at random are about 1 in 10,000.
Avoiding cracking of your hashing function by a determined cracker is harder.
-- Regards, David Cressey www.dcressey.comReceived on Fri Mar 09 2001 - 05:38:46 CET