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
Type | Name |
---|---|
System.String | licenseKeyText |
RemoveLicense()
View Source
Declaration
public static void RemoveLicense()
ActivatedLicenseFeatures()
View Source
Declaration
public static LicenseFeature ActivatedLicenseFeatures()
Returns
ApprovedUsage(Int32, Int32, String)
View Source
Declaration
public static void ApprovedUsage(int allowedUsage, int actualUsage, string message)
Parameters
Type | Name |
---|---|
System.Int32 | allowedUsage |
System.Int32 | actualUsage |
System.String | message |
ApprovedUsage(LicenseFeature, LicenseFeature, Int32, Int32, String)
View Source
Declaration
public static void ApprovedUsage(LicenseFeature licensedFeatures, LicenseFeature requestedFeature, int allowedUsage, int actualUsage, string message)
Parameters
Type | Name |
---|---|
ServiceStack.LicenseFeature | licensedFeatures |
ServiceStack.LicenseFeature | requestedFeature |
System.Int32 | allowedUsage |
System.Int32 | actualUsage |
System.String | message |
HasLicensedFeature(LicenseFeature)
View Source
Declaration
public static bool HasLicensedFeature(LicenseFeature feature)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.LicenseFeature | feature |
AssertValidUsage(LicenseFeature, QuotaType, Int32)
View Source
Declaration
public static void AssertValidUsage(LicenseFeature feature, QuotaType quotaType, int count)
Parameters
Type | Name |
---|---|
ServiceStack.LicenseFeature | feature |
ServiceStack.QuotaType | quotaType |
System.Int32 | count |
GetLicensedFeatures(LicenseKey)
View Source
Declaration
public static LicenseFeature GetLicensedFeatures(this LicenseKey key)
Returns
Parameters
Type | Name |
---|---|
ServiceStack.LicenseKey | key |
ToLicenseKey(String)
View Source
Declaration
public static LicenseKey ToLicenseKey(this string licenseKeyText)
Returns
Parameters
Type | Name |
---|---|
System.String | licenseKeyText |
ToLicenseKeyFallback(String)
View Source
Declaration
public static LicenseKey ToLicenseKeyFallback(this string licenseKeyText)
Returns
Parameters
Type | Name |
---|---|
System.String | licenseKeyText |
GetHashKeyToSign(LicenseKey)
View Source
Declaration
public static string GetHashKeyToSign(this LicenseKey key)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.LicenseKey | key |
GetInnerMostException(Exception)
View Source
Declaration
public static Exception GetInnerMostException(this Exception ex)
Returns
System.Exception
Parameters
Type | Name |
---|---|
System.Exception | ex |
VerifySignedHash(Byte[], Byte[], RSAParameters)
View Source
Declaration
public static bool VerifySignedHash(byte[] DataToVerify, byte[] SignedData, RSAParameters Key)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.Byte[] | DataToVerify |
System.Byte[] | SignedData |
System.Security.Cryptography.RSAParameters | Key |
VerifyLicenseKeyText(String)
View Source
Declaration
public static LicenseKey VerifyLicenseKeyText(string licenseKeyText)
Returns
Parameters
Type | Name |
---|---|
System.String | licenseKeyText |
VerifyLicenseKeyText(String, out LicenseKey)
View Source
Declaration
public static bool VerifyLicenseKeyText(this string licenseKeyText, out LicenseKey key)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | licenseKeyText |
ServiceStack.LicenseKey | key |
VerifyLicenseKeyTextFallback(String, out LicenseKey)
View Source
Declaration
public static bool VerifyLicenseKeyTextFallback(this string licenseKeyText, out LicenseKey key)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | licenseKeyText |
ServiceStack.LicenseKey | key |
VerifySha1Data(RSACryptoServiceProvider, Byte[], Byte[])
View Source
Declaration
public static bool VerifySha1Data(this RSACryptoServiceProvider RSAalg, byte[] unsignedData, byte[] encryptedData)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.Security.Cryptography.RSACryptoServiceProvider | RSAalg |
System.Byte[] | unsignedData |
System.Byte[] | encryptedData |