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 

Identifying Licensing Method Based on Key

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



Joined: 13 Dec 2006
Posts: 2

PostPosted: Wed Dec 13, 2006 8:33 pm    Post subject: Identifying Licensing Method Based on Key Reply with quote

I have an application that can be purchased or leased. I would like to determine this based on the key provided and used to licenses the application. I thought it would be as simple as creating a new product with different password to get a new LICENSE_PARAMETER. I tried this and called ValidateLicenseKey with the lease license parameter thinking it would be null if the license key specified was generated from the purchased product. Regardless of what LICENSE_PARAMETER value I use, I get a valid license for either key provided. My thought was the key generated for one product would not validate for the public key for the other product specified in the LICENSE_PARAMETER, but that does not seem to be the case.

Can someone suggest an approach for this. Based on the key, I need to determine if this license if for the lease versus the purchased product. I am already using a custom parameter generator to embed the name, email and company name hash into the key for verification. I would also like to embed the original lease start date in the key for the lease.

Thanks,

Steve
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Wed Dec 13, 2006 11:31 pm    Post subject: Reply with quote

If you change the product password and generate new LICENSE_PARAMETERS (which you use in your code) then keys generated with the original password should not validate with the new LICENSE_PARAMETERS. Note that if you use a license key strength of 7 then the passwords must be different in the first 7 characters otherwise the above may not be true.

So you should be able to use the approach you outlined. Personally I think it may be better to use a single product password and simply include the end date for the product lease in the product info of the key (for non-lease simply use a very far off date and check for this in the code).
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
smcneese



Joined: 13 Dec 2006
Posts: 2

PostPosted: Thu Dec 14, 2006 2:23 am    Post subject: Reply with quote

Yes, I realized that after looking through the code. The first part of my password was the same.

I originally thought about embedding the lease start in the product info, but that is just a hash. I cannot retreive the actual value just recalc the hash from the same info and compare with the product info hash of the key. Am I missing something there?

Since it is a lease, the need the terms (expiration) of the lease outside of the key. I don't want to generate a new key everytime they renew their lease. We are looking at using this as a monthly subscription to the software. The validation of payment and disabling the software for lack of payment will occur outside of the license code. I just need to determine that it is a lease key versus a purchase key.

Steve
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Thu Dec 14, 2006 2:45 am    Post subject: Reply with quote

You could include the lease start date and combine it with your hash. So your product info might look like:

140306#123 where 140306 is your start lease date and 123 is your hash of other info. Then you split your productinfo using the # divider. If you are willing to always have the same length date field then you can eliminate the separator. Then just use a special date to indicate no lease limit eg 000000
_________________
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