Beispiel #1
0
        /// <summary>
        /// 解析注册码
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public static string ParseKey(string inputCipher)
        {
            HKCryptString rsa = new HKCryptString();

            return rsa.DeCrypt(inputCipher);
        }
Beispiel #2
0
        /// <summary>
        /// 生成注册码
        /// </summary>
        public static string MakeKey(RegInfo regInfo)
        {
            string strInput = regInfo.CompanyCode + "*";
            strInput += regInfo.CompanyName + "*";

            strInput += regInfo.PcSn + "*";

            strInput += regInfo.LifeStartTime.Ticks + "*";
            strInput += regInfo.LifeEndTime.Ticks + "*";

            strInput += regInfo.ImportStartTime.Ticks + "*";
            strInput += regInfo.ImportEndTime.Ticks;

            HKCryptString rsa = new HKCryptString();

            return rsa.EnCrypt(strInput);
        }