-
generating unique reg. codes
Hi,
I'm looking for a resource which can offer advice on generating unique ID or
registration codes. We're preparing to distribute a large number of
CD-ROMs, and we want each one to have a unique code that we can print on
that disc's sleeve. Kind of like when AOL sends you a CD in the mail, it's
got a unique login code printed on it. (we're not talking about shareware
reg. or unlock codes)
I'm looking for both software that can generate ID's, but I'm even more
interested in any articles or whitepapers that discuss the theory behind
generating good ID's... severely reducing the likelihood of repetition or
guessing without making it too difficult for the user.
We considered using GUIDs but decided they were too long to expect the user
to enter correctly, and also, consecutively-generated GUID's had only one
character difference, giving a savvy user a good chance to guess another
GUID based on the one he/she has.
If anyone can help by referring me to a good resource that covers this
stuff, I'd really appreciate it!!
Thx,
Andy Goldberg
andynyc@spacelab.net
-
Re: generating unique reg. codes
Andy,
Some months ago I wrote some sample code to generate a random password. You
could use code similar the password code then add some sequence number to
the password, then 'sum' the digits creating 'check' digits [hash total].
Append the hash total to the 'password' and sequence number. You would end
up with a number something like:
RRRRRRRSSSSSSHH
Where R is a random digit, S is a sequence number and H is the hash total of
all the R's and S's. The sequence number would insure that the number is
unique. You could even intersperse the digits to make the sequence number
less obvious, for example:
SRRSRSSRRRSHHSS
If you want to review the password generator link to
http://www.buygold.net/tips.html then look for the November 1999 tip of the
month.
Cheers,
Larry Rebich
larry@buygold.net
www.buygold.net
"Andy Goldberg" <andynyc@spacelab.net> wrote in message
news:38df1513@news.devx.com...
> Hi,
>
> I'm looking for a resource which can offer advice on generating unique ID
or
> registration codes. We're preparing to distribute a large number of
> CD-ROMs, and we want each one to have a unique code that we can print on
> that disc's sleeve. Kind of like when AOL sends you a CD in the mail,
it's
> got a unique login code printed on it. (we're not talking about shareware
> reg. or unlock codes)
>
> I'm looking for both software that can generate ID's, but I'm even more
> interested in any articles or whitepapers that discuss the theory behind
> generating good ID's... severely reducing the likelihood of repetition or
> guessing without making it too difficult for the user.
>
> We considered using GUIDs but decided they were too long to expect the
user
> to enter correctly, and also, consecutively-generated GUID's had only one
> character difference, giving a savvy user a good chance to guess another
> GUID based on the one he/she has.
>
> If anyone can help by referring me to a good resource that covers this
> stuff, I'd really appreciate it!!
>
> Thx,
> Andy Goldberg
> andynyc@spacelab.net
>
>
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks