View previous topic :: View next topic |
Author |
Message |
jcwiese Guest
|
Posted: Sun Oct 09, 2005 10:55 pm Post subject: License Tracker: Length of Product Info for MDB |
|
|
I wanted to change the product info field in the MDB from a Text to Memo field in order to allow up to 65k in the License Tracker. I was able to do this in the MDB file on the LicenseKey table, but the Tracker application states that is still too long (key length was 280). Is this hard coded in the application? If so, is there any way to reduce this?
Thanks...
Reply to: jcwiese AT tablus DOT com |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Sun Oct 09, 2005 11:30 pm Post subject: |
|
|
The problem is that if you actually enter ProductInfo this long you will generate an even longer key (because the ProductInfo is encrypted in the key). The key field in the mdb is currently an indexed 256 character string field and can't be made any longer. Aside from that keys this long are really horrible for the end customer to deal with.
What are you putting in the product info that it needs to be this long? Generally you would only use it for information that needs to be guaranteed tamper proof (eg number of concurrent licenses, name of the licensee etc). If you really need to send your customer a copy of the text of "War and Peace" then it is better to send them this as clear text. If you need to guarantee that that haven't modified the clear text then you can embed a checksum (or to be really secure a DES signature) in the Productinfo and then have your application verify the text. The Custom Licensed Application sample illustrates this technique. _________________ Infralution Support |
|
Back to top |
|
|
jcwiese Guest
|
Posted: Mon Oct 10, 2005 12:43 am Post subject: |
|
|
Well, the problem is that I need to use an XML snippet to make sure it is encrypted, and this is the only spot that I can place it. For example,
<?xml version="1.0"?><config><maxUsers>20</maxUsers><expirationDate>1/1/2006 12:00:00 GMT</expirationDate></config>
... I don't exactly consider this "war and peace", and generally assume that a commercial license system should be able to handle it. |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Mon Oct 10, 2005 1:06 am Post subject: |
|
|
Since the ProductInfo is encrypted into license key I'm not sure what the benefit is of using XML for this. There are two approaches you could take:
1. Use a ProductInfo string like: "20:1/1/2006" and then simply split and parse this in your application. You can customize License Tracker to have your own user interface when generating keys and generate the string automatically for you (see the Custom Generator sample).
2. If you really need/want the XML for some reason then ship the XML as clear text to your customer and include a checksum on the XML string in the ProductInfo. When you read the XML into your application you can validate it against the checksum in the ProductInfo. Again you could customize License Tracker to generate the checksum automatically.
The licensing system itself can handle whatever length product info you want. Although forcing your customer to deal with really long encrypted license keys is probably not a good idea. License tracker was designed to process messages from distributors (such as ShareIt) that contain license keys and correlate these to previously generated license keys. For this reason it requires the ability to query the database for license keys using an indexed field (which have a max length of 256 in Access). _________________ Infralution Support |
|
Back to top |
|
|
Guest
|
Posted: Mon Oct 10, 2005 1:27 am Post subject: |
|
|
Yeah, I'd thought of that as well, but I'm feeding this data into another class which does the processing and isn't mine which requires it.
Just a thought, does the license component attempt to compress the text before encrypting it? If not, could you add this as a feature request? I really don't want to have long keys either, but I really can't forgo the XML structure. (NOTE: the XML can be validated externally, but it would have to get written twice: once for the values, and a second for the data)
Could you add these features into the compoent itself? |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Mon Oct 10, 2005 1:42 am Post subject: |
|
|
We don't currently compress the data that goes in product info - although this would be relatively easy for you to do using the Custom generation ability of License Tracker - and the decompress in your application.
But I think given the information you've just provided a better solution for you would be option 1 from the previous post ie
Quote: | Use a ProductInfo string like: "20:1/1/2006" and then simply split and parse this in your application. You can customize License Tracker to have your own user interface when generating keys and generate the string automatically for you (see the Custom Generator sample). |
Then in your application you can simply generate the XML string you need to feed into the 3rd party class eg
Code: |
string [] split = licenseKey.ProductInfo.Split(':')
int users = int.Parse(split[0]);
DateTime date = DateTime.Parse(split[1]);
string xmlString = string.Format("<?xml version="1.0"?><config><maxUsers>{0}</maxUsers><expirationDate>{1}</expirationDate></config>", users, date);
|
_________________ Infralution Support |
|
Back to top |
|
|
|