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 

Generate key from updated product info

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



Joined: 14 Aug 2018
Posts: 3

PostPosted: Fri Aug 24, 2018 2:29 pm    Post subject: Generate key from updated product info Reply with quote

Hello,

I'm using CutomGenerator to generate Encrypted license code. There are a lot of option to license and an expiration date.
All options are saved in productinfo. I want to reload these info when i open an existing license.

in MyGenerator.cs :

Code:
public class MyGenerator : ICustomGenerator
   {
        /// <summary>
        /// Get the ProductInfo and comments to include for the license key
        /// </summary>
        /// <param>The data to use to generate the license key</param>
        /// <param>The customer (if known)</param>
        /// <param>The sale (if known)</param>
        public void GetLicenseKeyData(CustomGeneratorData data, ICustomer customer, ISale sale)
        {
            MessageBox.Show("MyGenerator : " + data.ToString() + " AuthData: " + data.ProductInfo);
            LicenseDataForm form;
            LicenseData licInfo = new LicenseData(data.ProductInfo);
           
            if (!String.IsNullOrEmpty(data.ProductInfo))
            {
                form = new LicenseDataForm(licInfo);
            }
...


But product info is always null or empty.
How can I have this information?
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 4870

PostPosted: Sat Aug 25, 2018 12:25 am    Post subject: Reply with quote

Are you using Encrypted Licenses or Authenticated Licenses?

The GetLicenseKeyData method is only called when generating new LicenseKeys. It is not called for existing licenses.

For Authenticated License the UpdateAuthenticationData method is called for existing Licenses when you select Authentication > Set Authentication Data in License Tracker. The ProductInfo in this case should be set to the original value when the key was generated - however you cannot change it once the key has been generated because it is embedded into the key itself. If you want to change data for a license key after it has been generated then you must use AuthenticationData (ie Authenticed Licenses)
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Exakom



Joined: 14 Aug 2018
Posts: 3

PostPosted: Mon Aug 27, 2018 8:22 am    Post subject: Reply with quote

Hello,

Thank for your reply.

I'm using Encrypted licenses. I wish to have original license information (option, expiration, customer, ...) when i open my customgeneratorform.

Sometimes I need to change option or expiration date and create a new license and generate a new code, it will be usefull if I already have the original information.

If I change my product from Encrypted License to Authenticated License, what will be changed?
Will i be still able to send LicenseCode? and decrypt them in my product?
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 4870

PostPosted: Tue Aug 28, 2018 10:56 pm    Post subject: Reply with quote

Authenticated Licenses are very different. You have to run the Authentication Service on your website and customers will (in general) require internet access to install licenses. They do provide more flexibility however in allowing you to update existing licenses with new information (via AuthenticationData).

If you want to change options or expiration dates (embedded as part of ProductInfo) for Encrypted Licenses then you must generate a new key. You cannot change the data for an existing key.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Exakom



Joined: 14 Aug 2018
Posts: 3

PostPosted: Wed Aug 29, 2018 9:43 am    Post subject: Reply with quote

Hello,

So I can't migrate to Authenticated License because customers don't always have internet connection.

I'm ok to generate new code, but what l'd like to get information from former license to fill the custom form with.

As I understand it's not possible with EncryptedLicense.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 4870

PostPosted: Wed Aug 29, 2018 12:11 pm    Post subject: Reply with quote

There is no mechanism to pass the ProductInfo for an existing EncryptedLicense key back to your code via the CustomGenerator interface. You can of course look at the ProductInfo for previously generated license keys in License Tracker (in the ProductInfo column). Depending on how you have encoded the information you put into the ProductInfo this might help you.
_________________
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