프로퍼티 | 타입 | 설명 | |
---|---|---|---|
ArrayEqual | bool | ||
ArraySize | int | ||
FromHex | byte[] | ||
GetEncryptionKey | byte[] | ||
GetLicense | |||
LoadLicense | |||
Strip | string | ||
ToHex | string |
메소드 | 설명 | |
---|---|---|
GenerateKey ( string password, string productInfo, |
Generate a new encrypted license using the given password If there is no installed license for the Infralution Licensing System then the only allowed password is "TEST" and the only allowed serial numbers are 1 or 0. To use the licensed version of this method ensure that the file Infralution.Licensing.EncryptedLicenseProvider.lic exists in the same directory as the Infralution.Licensing.dll and contains a valid license key for the Licensing System. |
|
GenerateLicenseParameters ( string password ) : string |
Generate the XML license parameter string that is used to validate licenses generated using the given password
|
|
GetLicense ( System.ComponentModel.LicenseContext context, |
||
InstallLicense ( |
Install a license for the given type. This method is used by client applications to allow customers to register license for components. The generic Infralution.Licensing.LicenseInstallForm uses this method to install licenses. Client components may implement their own registration forms that call this method. You must call SetParameters before using this method. |
|
SetParameters ( string licenseParameters ) : void |
Set the parameters used to validate licenses created by this provider. This must be called by the client software prior to obtaining licenses using the EncryptedLicenseProvider. The parameters are generated using the Infralution License Key Generator and pasted into the calling client code. |
|
ValidateLicenseKey ( string licenseKey ) : |
Validate that the given license key is valid for the current licensing parameters This method provides a mechanism to validate that a given license key is valid prior to attempting to install it. This can be useful if you want to check the EncryptedLicense.ProductInfo before installing the license. You must call SetParameters before using this method. |
메소드 | 설명 | |
---|---|---|
GetLicenseDirectory ( System.ComponentModel.LicenseContext context, |
Return the directory used to store license files
|
|
GetLicenseFilePath ( System.ComponentModel.LicenseContext context, |
Called by GetLicenseKey to get the file path to obtain the license from (if there is no runtime license saved in the context) This can be overridden to change the file used to store the design time license for the provider. By default the the license file is stored in the same directory as the component executable with the name based on the fully qualified type name eg MyNamespace.MyControl.lic |
|
GetLicenseKey ( System.ComponentModel.LicenseContext context, |
Return the license key for the given context and type This can be overridden to change where the license key is stored by the provider. For instance a derived class could override this method to store the key in the Registry. |
|
ReadKeyFromFile ( string licenseFile ) : string |
Read a license key from the given file
|
|
ReadKeyFromRegistry ( ) : string |
Grab the key from the registry.
|
메소드 | 설명 | |
---|---|---|
ArrayEqual ( byte a1, byte a2 ) : bool |
Are the contents of the two byte arrays equal
|
|
ArraySize ( int length ) : int |
Return the array size to use when declaring an array of the given length. This is used to account for the difference between declaring VB and C# arrays and permit automatic conversion of the code to VB |
|
FromHex ( string hex ) : byte[] |
Converts a hexadecimal string into a byte array.
|
|
GetEncryptionKey ( string password ) : byte[] |
Generate an 8 byte DES encryption key using the given password Only the first 7 bytes of the key returned are used. This enables us to reduce the size of the final license keys by 8 bytes. |
|
GetLicense ( string licenseKey, string password ) : |
Return the license information from the given license key
|
|
LoadLicense ( System.ComponentModel.LicenseContext context, |
Extract the license for the given type from the given licenseKey
|
|
Strip ( string value, string characters ) : string |
Return the given input string stripped of the given characters
|
|
ToHex ( byte data ) : string |
Converts a byte array into a hexadecimal representation.
|
public GenerateKey ( string password, string productInfo, |
||
password | string | The password used to encrypted the license data |
productInfo | string | User defined data about the product being licensed |
serialNo | The unique license serial number | |
리턴 | string |
public GenerateLicenseParameters ( string password ) : string | ||
password | string | The password used to encrypted the license data |
리턴 | string |
public GetLicense ( System.ComponentModel.LicenseContext context, |
||
context | System.ComponentModel.LicenseContext | |
type | ||
instance | object | |
allowExceptions | bool | |
리턴 | License |
protected GetLicenseDirectory ( System.ComponentModel.LicenseContext context, |
||
context | System.ComponentModel.LicenseContext | The licence context |
type | The type being licensed | |
리턴 | string |
protected GetLicenseFilePath ( System.ComponentModel.LicenseContext context, |
||
context | System.ComponentModel.LicenseContext | The licence context |
type | The type to get the license for | |
리턴 | string |
protected GetLicenseKey ( System.ComponentModel.LicenseContext context, |
||
context | System.ComponentModel.LicenseContext | The license context |
type | The type to get the key for | |
리턴 | string |
public InstallLicense ( |
||
type | The type to install the license for | |
licenseKey | string | The license key to install |
리턴 |
protected ReadKeyFromFile ( string licenseFile ) : string | ||
licenseFile | string | The path to the license file to read the key from |
리턴 | string |
public static SetParameters ( string licenseParameters ) : void | ||
licenseParameters | string | An XML string containing parameters used to validate licenses |
리턴 | void |
public ValidateLicenseKey ( string licenseKey ) : |
||
licenseKey | string | The license key to validate |
리턴 |