Skip to main content

LicenseUtils

Internal Utilities to verify licensing

Assembly: ServiceStack.Text.dll
View Source
Declaration
public static class LicenseUtils

Properties

HasInit

View Source
Declaration
public static bool HasInit { get; }

LicenseWarningMessage

View Source
Declaration
public static string LicenseWarningMessage { get; }

Fields

RuntimePublicKey

View Source
Declaration
public const string RuntimePublicKey = "<RSAKeyValue><Modulus>nkqwkUAcuIlVzzOPENcQ+g5ALCe4LyzzWv59E4a7LuOM1Nb+hlNlnx2oBinIkvh09EyaxIX2PmaY0KtyDRIh+PoItkKeJe/TydIbK/bLa0+0Axuwa0MFShE6HdJo/dynpODm64+Sg1XfhICyfsBBSxuJMiVKjlMDIxu9kDg7vEs=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue>"

LicensePublicKey

View Source
Declaration
public const string LicensePublicKey = "<RSAKeyValue><Modulus>w2fTTfr2SrGCclwLUkrbH0XsIUpZDJ1Kei2YUwYGmIn5AUyCPLTUv3obDBUBFJKLQ61Khs7dDkXlzuJr5tkGQ0zS0PYsmBPAtszuTum+FAYRH4Wdhmlfqu1Z03gkCIo1i11TmamN5432uswwFCVH60JU3CpaN97Ehru39LA1X9E=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue>"

Methods

Init()

View Source
Declaration
public static void Init()

AssertEvaluationLicense()

View Source
Declaration
public static void AssertEvaluationLicense()

RegisterLicense(String)

View Source
Declaration
public static void RegisterLicense(string licenseKeyText)
Parameters
TypeName
System.StringlicenseKeyText

RemoveLicense()

View Source
Declaration
public static void RemoveLicense()

ActivatedLicenseFeatures()

View Source
Declaration
public static LicenseFeature ActivatedLicenseFeatures()
Returns

ServiceStack.LicenseFeature

ApprovedUsage(Int32, Int32, String)

View Source
Declaration
public static void ApprovedUsage(int allowedUsage, int actualUsage, string message)
Parameters
TypeName
System.Int32allowedUsage
System.Int32actualUsage
System.Stringmessage

ApprovedUsage(LicenseFeature, LicenseFeature, Int32, Int32, String)

View Source
Declaration
public static void ApprovedUsage(LicenseFeature licensedFeatures, LicenseFeature requestedFeature, int allowedUsage, int actualUsage, string message)
Parameters
TypeName
ServiceStack.LicenseFeaturelicensedFeatures
ServiceStack.LicenseFeaturerequestedFeature
System.Int32allowedUsage
System.Int32actualUsage
System.Stringmessage

HasLicensedFeature(LicenseFeature)

View Source
Declaration
public static bool HasLicensedFeature(LicenseFeature feature)
Returns

System.Boolean

Parameters
TypeName
ServiceStack.LicenseFeaturefeature

AssertValidUsage(LicenseFeature, QuotaType, Int32)

View Source
Declaration
public static void AssertValidUsage(LicenseFeature feature, QuotaType quotaType, int count)
Parameters
TypeName
ServiceStack.LicenseFeaturefeature
ServiceStack.QuotaTypequotaType
System.Int32count

GetLicensedFeatures(LicenseKey)

View Source
Declaration
public static LicenseFeature GetLicensedFeatures(this LicenseKey key)
Returns

ServiceStack.LicenseFeature

Parameters
TypeName
ServiceStack.LicenseKeykey

ToLicenseKey(String)

View Source
Declaration
public static LicenseKey ToLicenseKey(this string licenseKeyText)
Returns

ServiceStack.LicenseKey

Parameters
TypeName
System.StringlicenseKeyText

ToLicenseKeyFallback(String)

View Source
Declaration
public static LicenseKey ToLicenseKeyFallback(this string licenseKeyText)
Returns

ServiceStack.LicenseKey

Parameters
TypeName
System.StringlicenseKeyText

GetHashKeyToSign(LicenseKey)

View Source
Declaration
public static string GetHashKeyToSign(this LicenseKey key)
Returns

System.String

Parameters
TypeName
ServiceStack.LicenseKeykey

GetInnerMostException(Exception)

View Source
Declaration
public static Exception GetInnerMostException(this Exception ex)
Returns

System.Exception

Parameters
TypeName
System.Exceptionex

VerifySignedHash(Byte[], Byte[], RSAParameters)

View Source
Declaration
public static bool VerifySignedHash(byte[] DataToVerify, byte[] SignedData, RSAParameters Key)
Returns

System.Boolean

Parameters
TypeName
System.Byte[]DataToVerify
System.Byte[]SignedData
System.Security.Cryptography.RSAParametersKey

VerifyLicenseKeyText(String)

View Source
Declaration
public static LicenseKey VerifyLicenseKeyText(string licenseKeyText)
Returns

ServiceStack.LicenseKey

Parameters
TypeName
System.StringlicenseKeyText

VerifyLicenseKeyText(String, out LicenseKey)

View Source
Declaration
public static bool VerifyLicenseKeyText(this string licenseKeyText, out LicenseKey key)
Returns

System.Boolean

Parameters
TypeName
System.StringlicenseKeyText
ServiceStack.LicenseKeykey

VerifyLicenseKeyTextFallback(String, out LicenseKey)

View Source
Declaration
public static bool VerifyLicenseKeyTextFallback(this string licenseKeyText, out LicenseKey key)
Returns

System.Boolean

Parameters
TypeName
System.StringlicenseKeyText
ServiceStack.LicenseKeykey

VerifySha1Data(RSACryptoServiceProvider, Byte[], Byte[])

View Source
Declaration
public static bool VerifySha1Data(this RSACryptoServiceProvider RSAalg, byte[] unsignedData, byte[] encryptedData)
Returns

System.Boolean

Parameters
TypeName
System.Security.Cryptography.RSACryptoServiceProviderRSAalg
System.Byte[]unsignedData
System.Byte[]encryptedData