Click or drag to resize

SKM Methods

The SKM type exposes the following members.

Methods
  NameDescription
Public methodStatic memberDaysLeft(KeyInformation)
Returns the number of days left for a given license (time left). This method is particularly useful when KeyInfo is not updated regularly, because TimeLeft will not be affected (stay constant). If your implementation checks the license with the server periodically, this method should be used instead of TimeLeft.
Public methodStatic memberDaysLeft(KeyInformation, Boolean)
Returns the number of days left for a given license (time left). This method is particularly useful when KeyInfo is not updated regularly, because TimeLeft will not be affected (stay constant). If your implementation checks the license with the server periodically, this method should be used instead of TimeLeft.
Public methodStatic memberGenerateKey
Public methodStatic memberGetActivatedMachines
This method will retrieve the list of activated machines for a given serial key.
If successful, a list of type ActivatedData will be returned. If an error occurs, null is returned.
Public methodStatic membergetEightDigitsLongHash
This method will generate an 8 digit long hash which can be stored as an Int32.
Public methodStatic memberGetKeyInformationFromParameters
This method will interpret the input from the dictionary that was returned through "GetParameters" method, if the action was either "activate" or "validate".
Public methodStatic memberCode examplegetMachineCode
This method will calculate a machine code
Public methodStatic memberCode exampleGetParameters
This method will take in a set of parameters (input parameters) and send them to the given action. You can find them here: http://docs.serialkeymanager.com/web-api/.
Public methodStatic memberCode exampleGetProductVariables
Returns the product variables such as "uid", "pid", and "hsum".
Public methodStatic membergetSHA1
This method will generate a SHA1 hash.
Public methodStatic membergetSHA256
This method will generate a SHA256 hash.
Public methodStatic memberCode exampleIsKeyInformationGenuine
This method allows you to check if the key information (creation date, expiration date, etc.) in a request was modified on the way from Serial Key Manager server to the client application.
Public methodStatic memberCode exampleKeyActivation
This method will check whether the key is valid or invalid against the Serial Key Manager database. The method will return an object (KeyInformation) only if:
* the key exists in the database (it has been generated)
* the key is not blocked
* the machine code that is activated has not been activated before
* the limit for maximum number of machine codes has not been achieved
* the machine code exists in the Allowed Machine codes.
NOTE: In Addition, depending on the settings, this method will activate a machine code.
Public methodStatic memberCode exampleKeyDeactivation
This method will attempt to de-activate a machine code from the given key. If the given machine code was de-activated, KeyInformation confirming the key and the machine code will be returned. If something went wrong, for instance, if the machine code did not exist, null will be returned.
Public methodStatic memberCode exampleKeyValidation
This method will check whether the key is valid or invalid against the Serial Key Manager database The method will return an object (KeyInformation) only if:
* the key exists in the database (it has been generated)
* the key is not blocked
Public methodStatic memberListUserProducts
Lists all your products associated with your account. Each product name is accompanied with a product id.
Public methodStatic memberLoadKeyInformationFromFile
This method loads key information stored in a file into a key information variable.
Public methodStatic memberCode exampleLoadProductVariablesFromString
This method will load ProductVariables data from a json serialized string. (see Example below.)
Public methodStatic memberCode exampleOptionalField
Public methodStatic memberSaveKeyInformationToFile
This method saves all information inside key information into a file.
Public methodStatic memberCode exampleTimeCheck
This method checks whether the network time is different from the local time (client computer). This helps to prevent date changes caused by a client.
Top
See Also