Example #1
0
 private string getPreProductKey(string productkey)
 {
     HROne.CommonLib.Crypto crypto = new HROne.CommonLib.Crypto(symProvEnum);
     foreach (ProductLicenseType value in Enum.GetValues(typeof(ProductLicenseType)))
     {
         try
         {
             string preProductKey = crypto.Decrypting(base32.ConvertBase32ToBase64(productkey), value.ToString());
             m_ProductType = value;
             return(preProductKey);
         }
         catch
         {
         }
     }
     return(string.Empty);
 }
Example #2
0
        private string getPreProductKey(string productkey)
        {
            Crypto crypto = new Crypto(symProvEnum);

            foreach (string productTypeName in Enum.GetNames(typeof(ProductLicenseType)))
            {
                try
                {
                    string preProductKey = crypto.Decrypting(base32.ConvertBase32ToBase64(productkey), productTypeName);
                    m_ProductType = (ProductLicenseType)Enum.Parse(typeof(ProductLicenseType), productTypeName);
                    return(preProductKey);
                }
                catch
                {
                }
            }
            m_ProductType = ProductLicenseType.NONE;
            return(string.Empty);
        }
 public static bool HasPriorVersionLicense(this SueetieUser _user, ProductPackage _productPackage, ProductLicenseType _productLicenseType)
 {
     return(Licenses.GetProductLicenseList().Any <ProductLicense>(l => ((((l.PackageTypeID == _productPackage.PackageTypeID) && (l.LicenseTypeID >= (int)_productLicenseType)) && (l.MajorVersion < _productPackage.MajorVersion)) && (l.UserID == _user.UserID))));
 }
Example #4
0
 public static ProductLicense GetProductLicense(ProductPackage _productPackage, int _userID, ProductLicenseType _productLicenseType)
 {
     return(GetProductLicenseList().Find(p => (((p.PackageTypeID == _productPackage.PackageTypeID) && (p.LicenseTypeID == (int)_productLicenseType)) && (p.Version == _productPackage.Version)) && (p.UserID == _userID)));
 }