using System;
using System.IO;
using Manager;
using SeriousBit.Ellipter;
namespace ManagerServer
{
// Token: 0x0200002F RID: 47
public sealed class ProductKey
{
// Token: 0x06000103 RID: 259 RVA: 0x00005EC4 File Offset: 0x000040C4
static ProductKey()
{
string keyPath = Path.Combine(ApplicationData.BaseDirectory, "key");
if (File.Exists(keyPath))
{
ProductKey.Value = File.ReadAllText(keyPath);
SerialsManager mngr = new SerialsManager("NGSoftware Pty Ltd", "QQFJ43T-TSRKTL8-JXJFR65-G57WZ7E-PK6N3X1-2TFTCDQ-1B7GP", KeyStrength.Use128Bits);
mngr.PublicKey = "WUG8KKHAFHVNT3XBPM6SE3JQJK2DYYD2M6CNVEJDB5XSVK7U52MHE";
if (!string.IsNullOrWhiteSpace(ProductKey.Value) && mngr.IsValid(ProductKey.Value))
{
ProductKey.ExpiryDate = new DateTime?(new DateTime(mngr.GetID(ProductKey.Value)));
Version v = new Version(ProductKey.ExpiryDate.Value.Year - 2000, ProductKey.ExpiryDate.Value.Month);
Version currentVersion = new Version(typeof(ProductKey).Assembly.GetName().Version.Major, typeof(ProductKey).Assembly.GetName().Version.Minor);
if (v >= currentVersion)
{
ProductKey.Valid = true;
}
}
}
}
// Token: 0x04000066 RID: 102
public static string Value;
// Token: 0x04000067 RID: 103
public static bool Valid;
// Token: 0x04000068 RID: 104
public static DateTime? ExpiryDate;
}
}