SKM.V3Version: 4.0.54. Both packages; all six documented target frameworks.
Loading a Saved Response
UseSKM.V3, SKM.V3.Methods and SKM.V3.Models (with using in C# or Imports in VB.NET). Replace YOUR_RSA_PUBLIC_KEY with your RSA public key. licensefile.skm is the file saved earlier; 3 is the example maximum age in days. Loading verifies the signature, and the next call adds the age check. This example does not check expiry or machine binding; see Offline Verification.
Methods
Contains(List<DataObject>, string)
Checks if the list contains an object with a specific name.
Returns:
bool. True if the data object with the specific name exists and false otherwise.
Get(List<DataObject>, string)
Returns a data object with the specified name.
Returns:
DataObject. The data object if the data object with the specific name exists and null otherwise.
HasFeature(LicenseKey, int)
Checks so that a certain Feature is enabled (i.e. it’s set to TRUE).
Returns:
LicenseKey. A key information object if the condition is satisfied. Null otherwise.
HasNotExpired(LicenseKey, bool, bool)
Checks the expiry using the device UTC clock and this helper’s whole-day comparison.
Returns:
LicenseKey. The original LicenseKey when the check passes; null otherwise.
Checks: With allowUsagOnExpirationDate=true, the helper accepts (Expires - DateTime.UtcNow).Days >= 0; with false it requires .Days > 0. These whole-day rules are not an exact timestamp comparison.
For an exact expiry deadline, compare DateTime.UtcNow with Expires. checkWithInternetTime=true also calls the legacy internet-time helper; it requires connectivity and is not an offline trusted-time design.
HasNotFeature(LicenseKey, int)
Checks so that a certain Feature is disabled (i.e. it’s set to FALSE).
Returns:
LicenseKey. A key information object if the condition is satisfied. Null otherwise.
HasValidSignature(LicenseKey, string)
Checks the license signature and, when supplied, the signed response age.
Returns:
LicenseKey. The original LicenseKey when the checks pass; null otherwise.
Checks: The overload with signatureExpirationInterval rejects a response when the whole-day component of DateTime.UtcNow - SignDate reaches that interval. A null interval omits the age check.
The interval is in days and is separate from license expiry. The age check uses the device clock; a signed timestamp does not prevent clock rollback. Saving the file again does not reset SignDate.
HasValidSignature(LicenseKey, string, int?)
Checks the license signature and, when supplied, the signed response age.
Returns:
LicenseKey. The original LicenseKey when the checks pass; null otherwise.
Checks: The overload with signatureExpirationInterval rejects a response when the whole-day component of DateTime.UtcNow - SignDate reaches that interval. A null interval omits the age check.
The interval is in days and is separate from license expiry. The age check uses the device clock; a signed timestamp does not prevent clock rollback. Saving the file again does not reset SignDate.
IsBlocked(LicenseKey)
Checks so that a they key is blocked.
Returns:
LicenseKey. A key information object if the condition is satisfied. Null otherwise.
IsNotBlocked(LicenseKey)
Checks so that a they key is not blocked.
Returns:
LicenseKey. A key information object if the condition is satisfied. Null otherwise.
IsOnRightMachine(LicenseKey, bool, bool)
Checks whether the license lists the expected machine or process identity.
Returns:
LicenseKey. The LicenseKey for a match, or null otherwise.
Checks: Matches activation identifiers only; it does not verify the signature or check a floating-seat deadline.
For new integrations, use an explicit machine code or Helpers.IsOnRightMachinePI. The overload without a machine code uses the older SHA1-based Windows helper. Machine binding is meaningful when Maximum Number of Machines is greater than zero.
IsOnRightMachine(LicenseKey, Func<string, string>, bool, bool)
Checks whether the license lists the expected machine or process identity.
Returns:
LicenseKey. The LicenseKey for a match, or null otherwise.
Checks: Matches activation identifiers only; it does not verify the signature or check a floating-seat deadline.
For new integrations, use an explicit machine code or Helpers.IsOnRightMachinePI. The overload without a machine code uses the older SHA1-based Windows helper. Machine binding is meaningful when Maximum Number of Machines is greater than zero.
IsOnRightMachine(LicenseKey, string, bool, bool)
Checks whether the license lists the expected machine or process identity.
Returns:
LicenseKey. The LicenseKey for a match, or null otherwise.
Checks: Matches activation identifiers only; it does not verify the signature or check a floating-seat deadline.
For new integrations, use an explicit machine code or Helpers.IsOnRightMachinePI. The overload without a machine code uses the older SHA1-based Windows helper. Machine binding is meaningful when Maximum Number of Machines is greater than zero.
IsValid(LicenseKey)
Returns true when the license object is not null.
Returns:
bool. True for a non-null LicenseKey; false for null.
Checks: This overload performs no signature, expiry, blocking, feature or machine check.
Use it to finish a chain of checks that return the license on success and null on failure.
IsValid(LicenseKey, string)
Checks that the license is not null and has a valid signature.
Returns:
bool. True when the object is non-null and the signature check succeeds; false otherwise.
Checks: Verifies the signature. It does not check expiry, blocking, features or machine binding.
LoadFromFile(LicenseKey, string, string)
Reads a saved license file and loads its JSON.
Returns:
LicenseKey. A new LicenseKey, or null when reading, parsing or verification fails.
Checks: Uses LoadFromString. The default RSAPubKey=null does not verify serialized LicenseKey JSON; pass your RSA public key.
The default filename is licensekey.skm. Assign the returned object; the receiver is not updated.
LoadFromString(LicenseKey, string, string)
Loads a license from a saved JSON string.
Returns:
LicenseKey. A new LicenseKey, or null for a caught parsing or verification failure.
Checks: A RawResponse is verified through LicenseKey.FromResponse. For serialized LicenseKey JSON, a supplied RSA public key enables verification; a null RSA public key only deserializes that format.
Supply your RSA public key when loading a license for use. This method does not enforce a maximum cache age, expiry, blocking, features or machine binding.
RegisterEvent(LicenseKey, string, Event)
Registers a usage event for this license.
Returns:
void. No return value. This convenience method discards the API result.
Checks: No signature or license-policy checks.
Failure Behavior: API failures are not returned to the caller. Use AI.RegisterEvent when you need its result.
The overload without a machine code calls the older Helpers.GetMachineCode() helper. Both overloads copy the event name, feature name, currency and value; they do not forward Event.Time or Event.Metadata. These methods are present in all documented builds, including .NET Standard.
RegisterEvent(LicenseKey, string, Event, string)
Registers a usage event for this license.
Returns:
void. No return value. This convenience method discards the API result.
Checks: No signature or license-policy checks.
Failure Behavior: API failures are not returned to the caller. Use AI.RegisterEvent when you need its result.
The overload without a machine code calls the older Helpers.GetMachineCode() helper. Both overloads copy the event name, feature name, currency and value; they do not forward Event.Time or Event.Metadata. These methods are present in all documented builds, including .NET Standard.
SaveAsString(LicenseKey)
Serializes the license for storage.
Returns:
string. JSON containing the original RawResponse when it is available; otherwise JSON containing the LicenseKey object.
Checks: Saving does not verify the license or change its signed timestamp.
SaveToFile(LicenseKey)
Saves the serialized license to a file.
Returns:
LicenseKey. The original LicenseKey on success, or null when saving fails.
The overload without a filename uses licensekey.skm. Saving does not renew the license or restart an offline allowance.
SaveToFile(LicenseKey, string)
Saves the serialized license to a file.
Returns:
LicenseKey. The original LicenseKey on success, or null when saving fails.
The overload without a filename uses licensekey.skm. Saving does not renew the license or restart an offline allowance.
FAQ
What Does IsValid Check?
What Does IsValid Check?
IsValid() returns true when the object is not null. It is often the last call in a chain such as license.HasFeature(1).IsValid(); the preceding helper performs the feature check.IsValid(RSAPubKey) also verifies the signature. Neither overload adds expiry, blocking, product or machine checks. See the Key Verification FAQ.Can I Load a License Without an RSA Public Key?
Can I Load a License Without an RSA Public Key?
The serialized
LicenseKey format can be loaded without one, but its signature is then not verified. Supply your RSA public key when loading a file used to authorize your application. The RawResponse format always goes through FromResponse and cannot be verified without a suitable key.Loading returns a new object, so assign the result. It does not update the receiver.Does Saving a File Restart Its Offline Allowance?
Does Saving a File Restart Its Offline Allowance?
No.
HasValidSignature(RSAPubKey, 3) uses the signed SignDate, not the file modification time. In 4.0.54 it rejects a response when its age in whole days is at least 3. This is separate from license expiry and a floating-seat deadline.The check uses the device clock. A signed timestamp prevents alteration of that timestamp; it does not provide trustworthy current time, so clock rollback can defeat the age check. See Offline Verification.Does HasNotExpired Enforce an Exact Expiry Time?
Does HasNotExpired Enforce an Exact Expiry Time?
No. Version 4.0.54 uses the whole-day component of
Expires - DateTime.UtcNow. Its default allowUsagOnExpirationDate=true can accept a time less than one day after Expires. With false, it requires a positive whole-day component. If your policy uses an exact timestamp, compare DateTime.UtcNow with Expires directly.