View previous topic :: View next topic |
Author |
Message |
anandcbe14
Joined: 27 Apr 2007 Posts: 1
|
Posted: Fri Apr 27, 2007 2:53 am Post subject: Sample Code for Custom EncryptedLicenseProvider? |
|
|
I'm evaluating the Infralution Licensing product. I want to store keys entered as encrypted strings in a file or registry. Any code samples to achieve this would be highly appreciated.
Thanks |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Sat Apr 28, 2007 12:10 am Post subject: |
|
|
To encrypt the keys and store them in a file you would derive a new class from EncryptedLicenseProvider and the override the WriteKeyToFile and ReadKeyFromFile methods to encrypt the key before saving it.
If you are using the standard LicenseInstallForm then you need to set the LicenseProvider property to an instance of your derived class.
An alternative approach is for your application to take full control over loading/saving the key and use the EncryptedLicenseProvider.ValidateLicenseKey method to verify the key. The CustomLicensedApp sample project shows how to do this. In this approach you can't use the standard LicenseInstallForm - you need to either create your own. _________________ Infralution Support |
|
Back to top |
|
|
|