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 

Get Serial from Key

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



Joined: 04 Dec 2008
Posts: 7

PostPosted: Sun Dec 12, 2010 5:10 pm    Post subject: Get Serial from Key Reply with quote

I use AuthenticatedLicense on my product and created a program to return the serial number of a key and this works but, it adds one Authentication to the server for that key and My computer.

so, can I get the serial number from an Authenticated License Key without updating the server?
Back to top
View user's profile Send private message
frankcrowder



Joined: 04 Dec 2008
Posts: 7

PostPosted: Sun Dec 12, 2010 6:15 pm    Post subject: fixed Reply with quote

AuthenticatedLicenseProvider provider = new AuthenticatedLicenseProvider();

string key;
key = textBox1.Text; //License Key sent to customer for this product

AuthenticatedLicenseParameters lp = new AuthenticatedLicenseParameters();
lp.ReadFromString(LP); //LP = the LicenseParameters for this product
lp.ProductPassword = "yourproductpassword";
lp.AuthenticationPassword = "yourauthpassword";

EncryptedLicense authLicense = provider.DecryptAuthenticationKey(lp, key);
if (authLicense != null)
{
label1.Text = authLicense.SerialNo.ToString();
label3.Text = authLicense.ProductInfo;
label2.Text = authLicense.LicenseKey;
}
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Sun Dec 12, 2010 10:33 pm    Post subject: Reply with quote

What you've posted should be fine if you want to extract the serial number for use within your own license tracking applications. Obviously however this code should not be included in any client side application code - since it includes the passwords required to generate keys.
_________________
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