Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Key Generation
Message
From
05/04/2002 14:51:32
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00641547
Message ID:
00641592
Views:
9
This is basically just changing from a base 10 representation to a base x - higher numbers get you fewer characters (like hex - base 16), lower numbers get you more characters (like binary - base 2). First decide what characters you want (implies how many unique ones), and it's easy to calculate the length of the maximum string your 30 digits will produce.

Rick

>Hi Garrett,
>
>No, I do not need a Primary Key.
>
>Maybe this explains it better.
>
>Basically, I have this number "100967264812303132072492020405" or one like it. It is built using a code to make it unique and is bound to the computer and CD and a few other things. I need to take that long number and encrypt it in such a way that it will be at least half as long and made up as Alpha/numeric. So it should come out as "LIUNCpanNpa1nSjfnJQd" or something like that. I would also need to be able to reverse it to make sure the number is correct.
>
>Thanks,
>Ron
>
>>>I am looking for a way to generate a product key.
>>>
>>>I will be using a 30 digit number that is unique to an application and I
>>>need to generate a 10 to 20 digit key for it.
>>>
>>>What would be the best way to do this?
>>
>>Do you mean that you will be generating a sequential primary key for a database? If so, there's a sample of how to do this in the stored procedures of TasTrade.dbc.
>>
>>If not, please give us some more details of what you're trying to do.
Previous
Reply
Map
View

Click here to load this message in the networking platform