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 

ADVICE for Enrypted Licensing

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



Joined: 06 Mar 2013
Posts: 38

PostPosted: Fri May 15, 2015 9:20 pm    Post subject: ADVICE for Enrypted Licensing Reply with quote

I am avoiding authenticated licensing for now until I have a web page set up to allow a user to do this and authenticate automatically.

I am using the standard encrypted licensing model - simple Encrypted Licensing.

Is there a way to provide more security by asking the user to provide a machine ID and include that as a parametrr in the license. The user would run a script to obtain their machine id, send it to me, I would add it to the parameter, and when licesing checks are initiated I would compare the machine ID with the parameter.

Seems like a user can just share the key and there is no security.

Also, I want to uninstall the license when my installer uninstalled my program. I am using WIX and have already written some custom actions. Can you provide a sample for Simple Encrypted Licensing? I see an example here for authenticated

http://www.infralution.com/phpBB2/viewtopic.php?t=2573
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Fri May 15, 2015 11:22 pm    Post subject: Reply with quote

You can included a machine ID in the ProductInfo of the license key when you generate it then check this when the license is loaded. You would want to keep the ID short because the more information you include in the ProductInfo the longer the generated keys become. The LicenseUtilities class/module contains a Checksum function that produces a short ID from a longer string which can be suitable for this.

The WIX uninstall code for EncryptedLicense is the same as for AuthenticatedLicenses - except you can just call provider.UninstallLicense without deauthenticating ie:

Code:

         [CustomAction]
         public static ActionResult UninstallLicense(Session session)
         {
             try
             {
                 EncryptedLicenseProvider provider = new EncryptedLicenseProvider(LICENSE_PARAMETERS, _licenseFile);
                     provider.UninstallLicense();
             }
             catch (Exception e)
             {
                 ShowError(session, string.Format(LicenseResources.UninstallErrorMsg, e.Message, _licenseFile));
             }
             return ActionResult.Success;
         }

_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
tslewis



Joined: 06 Mar 2013
Posts: 38

PostPosted: Sun May 17, 2015 11:14 pm    Post subject: Reply with quote

Infralution wrote:
You can included a machine ID in the ProductInfo of the license key when you generate it then check this when the license is loaded. You would want to keep the ID short because the more information you include in the ProductInfo the longer the generated keys become. The LicenseUtilities class/module contains a Checksum function that produces a short ID from a longer string which can be suitable for this.

The WIX uninstall code for EncryptedLicense is the same as for AuthenticatedLicenses - except you can just call provider.UninstallLicense without deauthenticating ie:

Code:

         [CustomAction]
         public static ActionResult UninstallLicense(Session session)
         {
             try
             {
                 EncryptedLicenseProvider provider = new EncryptedLicenseProvider(LICENSE_PARAMETERS, _licenseFile);
                     provider.UninstallLicense();
             }
             catch (Exception e)
             {
                 ShowError(session, string.Format(LicenseResources.UninstallErrorMsg, e.Message, _licenseFile));
             }
             return ActionResult.Success;
         }


why would one care about the length of the key? The user only needs to install the key once so what does it matter? Its just copy and paste right? Does the length of the key affect the performance of my application?
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Sun May 17, 2015 11:17 pm    Post subject: Reply with quote

Some people care about the length of the key. If you want to be able provide someone a key over the phone for instance it is important. The database does have a limit on the length of the key it can store (255 characters) so there is eventually a limit - even though you are not likely to hit it.
_________________
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