Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Product Prefix for license keys

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Support
View previous topic :: View next topic  
Author Message
JohnnyRoy



Joined: 09 Aug 2006
Posts: 4
Location: New York, USA

PostPosted: Wed Aug 09, 2006 12:19 am    Post subject: Product Prefix for license keys Reply with quote

I’ve been evaluating your product and I am very impressed with its capabilities and price. It does everything I need except for one thing that I haven’t seen demonstrated.

How can I add a product prefix to the license key for humans to read?

We have products which are plug-ins to a host application and our customers will often buy several of them and, in the past, have used the wrong key to license a product. This has caused a lot of support related issues. I need a way for our support personnel and customers to quickly look at a key and determine which product it is for. Just a prefix of a few letters will do.

Do I have to write a custom key generator to do this? (and will the license provider accept it?) or is it more complicated than that?

~jr
Back to top
View user's profile Send private message Visit poster's website
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Wed Aug 09, 2006 8:51 am    Post subject: Reply with quote

To generate keys with a product prefix you would need to purchase the License Tracker source code and modify the method that generates the keys. This would be relatively simple. With a little more work you could add a "ProductPrefix" field to the database and to the Product Dialog so that you can add the appropriate prefix to each product.

You can try this out with the evaluation version of ILS by writing your own simple license key generator that uses the the EncryptedLicenseProvider.GenerateKey method and adds the prefix.

You can handle the prefixed key in your application in three different ways:

1. Derive a new class from LicenseInstallForm and override the InstallLicenseKey method to strip the prefix before calling the base method to install the key. The only disadvantage of this is that the key stored in the file then won't have the prefix.

2. Load/save the key yourself and strip the prefix before using EncryptedLicenseProvider.ValidateLicenseKey to check the key. See the Custom Licensed App for an example of using a custom install form and ValidateLicenseKey.

3. Once you purchase ILS and have the source code for EncryptedLicenseProvider you could modify the LoadLicense method to strip the prefix from the key.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
JohnnyRoy



Joined: 09 Aug 2006
Posts: 4
Location: New York, USA

PostPosted: Wed Aug 09, 2006 2:38 pm    Post subject: Reply with quote

Thanks, you guys Rock! That will work just fine. I just purchased your ILS product.

I gotta tell ya’, I was evaluating XEHO|Licensing but your product is much easier to work with and much more flexible. Like you, I hate activation and their serial number support seems to be an after-thought that was bolted on. Their solution is really inflexible and customer hostile. ILS was a breath of fresh air.

Thanks again for making a flexible licensing solution that is affordable for us “little guys”.

~jr
Back to top
View user's profile Send private message Visit poster's website
Guest






PostPosted: Sat Aug 26, 2006 7:42 pm    Post subject: Reply with quote

Infralution wrote:
3. Once you purchase ILS and have the source code for EncryptedLicenseProvider you could modify the LoadLicense method to strip the prefix from the key.

I purchased your product but I don’t like modifying source code and would much rather use inheritance to solve a problem like this so that future versions of your code won’t overwrite mine. But there’s a problem:

What I decided to do is subclass EncryptedLicenseProvider with my ExtendedLicenseProvider and override the ReadKeyFromFile() method and the InstallLicense() method to compensate for the prefix. Unfortunately, InstallLicense calls LoadLicense() and LoadLicense is private in the original code. Why? If you expect people to extend your code, shouldn’t methods like this be protected but not private so that they can be seen by inherited classes?

If I change LoadLicense from private to protected, would it compromise security in anyway?

The alternative is to have my InstallLicense call the base.InstallLicense (which will write the key without the prefix) and then overwrite the key in the file with the extended key that has the prefix. I just would rather not do double IO. I want the prefix to be in the file as it’s the only way for a customer to determine what product the key is for.

~jr
Back to top
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Sun Aug 27, 2006 10:51 pm    Post subject: Reply with quote

The reason LoadLicense is private rather than protected is largely historical. In general I agree - if there is no reason for a method to be private - then it should be protected to allow extensibility. There would be no issue with you changing this - and we will change the method to virtual protected in the next release.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group