MirraKey Methods
Function EncryptString(strToEncrypt As String, strEncryptionKey As String) As String
Function GenerateKey() As String
Function GetFeatures() As Long
Sub ShowLicenseKeyManager(bShowProductName As Boolean,
bShowSerialNo As Boolean, bShowUserName As Boolean)
Function ValidateKey() As Boolean
MirraKey is a COM ActiveX library and needs to be added to your project as a Reference
and declared to call its methods or set properties.
Visual Basic 6 declaration
Dim objMirraKey as MirraKey
Set objMirraKey = New MirraKey
VB.Net declaration
Dim objMirraKey as New MirraKeyLib.MirraKey
|
|
EnryptString method |
|
Description |
Return the encrypted value of 'strToEncrypt' using the provided encryption key 'strEncryptionKey' |
|
Syntax |
Function EncryptString(strToEncrypt, strEncryptionKey) as String |
|
Returned Value |
String as a Base64-encoded encrypted string or an empty string if an error occurs. |
|
strToEncrypt |
A string value of the text you want to encrypt. |
|
strEncryptionKey |
A strng value of the encryption key used to encrypt the data provided. |
|
Example |
strValue = objMirraKey.EncryptString(strToEncrypt, strEncryptionKey) |
|
GenerateKey method |
|
Description |
Return the license key string generated using one or more of the properties 'ProductName',
'SerialNo' and 'UserName' plus the optional 'Options' property. |
|
Syntax |
Function GenerateKey() As String |
|
Returned Value |
Alpha-numeric string of the license key generated or an empty string if an error occurs. |
|
Example |
objMirraKey.SerialNo = "12345"
strLicenseKey = objMirraKey.GenerateKey()
(You must set one or more of the 'ProductName', 'SerialNo' or 'UserName' properties.) |
|
GetFeatures method |
|
Description |
Return a long integer value from the license key based on the Options property (if
any) set when the license key was generated. |
|
Syntax |
Function GetFeatures() As Long |
|
Returned Value |
Long integer that can be resolved to return any combination of up to 8 options or
features of your software. |
|
Example |
lngValue = objMirraKey.GetFeatures() |
|
ShowLicenseKeyManager method |
|
Description |
Display the License Key Manager form which will return your software's registration
information or allow you client to enter the License Key and other relevant details
to register your software. The License Key Manager form also includes a 'Purchase'
button that links to your website using the 'PurchaseURL' property. |
|
Syntax |
Sub ShowLicenseKeyManager(bShowProductName As Boolean, bShowSerialNo As Boolean,
bShowUserName As Boolean) |
|
Returned Value |
None |
|
Example |
bShowProductName = True
bShowSerialNo = True
bShowUserName = True
objMirraKey.ShowLicenseKeyManager(bShowProductName, bShowSerialNo, bShowUserName) |
|
ValidateKey method |
|
Description |
Returns a boolean value True or False based on validating the License Key and relevant
'ProductName', 'SerialNo' and 'UserName' properties. |
|
Syntax |
Function ValidateKey() as Boolean |
|
Returned Value |
Boolean value True or False |
|
Example |
objMirraKey.LicenseKey = strLicenseKey
objMirraKey.SerialNo = strSerialNo
objMirraKey.ProductName = strProductName
objMirraKey.UserName = strUserName
objMirraKey.ValidateKey() |
|