Class LicenseKey
This class contains information stored in a license key and is responsible for creating and decoding license keys.
Inheritance
Inherited Members
Namespace: ArmDot.Api.Keys
Assembly: ArmDot.Api.Keys.dll
Syntax
public class LicenseKey
Properties
ExpirationDate
Stores the expiration date that is stored in the license key.
Declaration
public DateTime? ExpirationDate { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.DateTime> |
HardwareId
Stores the hardware id that is stored in the license key.
Declaration
public string HardwareId { get; }
Property Value
Type | Description |
---|---|
System.String |
Key
Stores the license key
Declaration
public string Key { get; }
Property Value
Type | Description |
---|---|
System.String |
MaximumBuildDate
Stores the maximum build date that is stored in the license key.
Declaration
public DateTime? MaximumBuildDate { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.DateTime> |
RegistrationEMail
Stores the registration email that is stored in the license key.
Declaration
public string RegistrationEMail { get; }
Property Value
Type | Description |
---|---|
System.String |
RegistrationName
Stores the registration name that is stored in the license key.
Declaration
public string RegistrationName { get; }
Property Value
Type | Description |
---|---|
System.String |
UserData
Stores the user date that is stored in the license key.
Declaration
public byte[] UserData { get; }
Property Value
Type | Description |
---|---|
System.Byte[] |
Methods
Create(Byte[], Byte[], String, String, Nullable<DateTime>, Nullable<DateTime>, Byte[], String)
Creates a new license key
Declaration
public static LicenseKey Create(byte[] modulus, byte[] privateExponent, string registrationName, string registrationEmail, DateTime? expirationDate, DateTime? maximumBuildDate, byte[] userData, string hardwareId)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | modulus | A modulus that is used for license key generation |
System.Byte[] | privateExponent | A private exponent that is used for license key generation |
System.String | registrationName | A registration name that is used for license key generation |
System.String | registrationEmail | A registration email that is used for license key generation |
System.Nullable<System.DateTime> | expirationDate | An expiration date that is used for license key generation |
System.Nullable<System.DateTime> | maximumBuildDate | A maximum build date that is used for license key generation |
System.Byte[] | userData | A user data that is used for license key generation |
System.String | hardwareId | A hardware id that is used for license key generation |
Returns
Type | Description |
---|---|
LicenseKey |
Create(String, String, String, String, Nullable<DateTime>, Nullable<DateTime>, Byte[], String)
Creates a new license key
Declaration
public static LicenseKey Create(string modulus, string privateExponent, string registrationName, string registrationEmail, DateTime? expirationDate, DateTime? maximumBuildDate, byte[] userData, string hardwareId)
Parameters
Type | Name | Description |
---|---|---|
System.String | modulus | A modulus that is used for license key generation |
System.String | privateExponent | A private exponent that is used for license key generation |
System.String | registrationName | A registration name that is used for license key generation |
System.String | registrationEmail | A registration email that is used for license key generation |
System.Nullable<System.DateTime> | expirationDate | An expiration date that is used for license key generation |
System.Nullable<System.DateTime> | maximumBuildDate | A maximum build date that is used for license key generation |
System.Byte[] | userData | A user data that is used for license key generation |
System.String | hardwareId | A hardware id that is used for license key generation |
Returns
Type | Description |
---|---|
LicenseKey |
Decode(String, Byte[], Byte[])
Decodes a license key
Declaration
public static LicenseKey Decode(string key, byte[] modulus, byte[] publicExponent)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | A license key |
System.Byte[] | modulus | A modulus that has been used for license key generation |
System.Byte[] | publicExponent | A public exponent that has been used for license key generation |
Returns
Type | Description |
---|---|
LicenseKey |