Пример #1
0
        public static object Login(string userID, string password)
        {
            string     key   = Guid.NewGuid().ToString();
            string     iV    = Guid.NewGuid().ToString();
            InvokeInfo info  = new InvokeInfo("Decrypt", new object[] { key, iV, SymmetricCrypt.Encrypt(key, iV, userID) });
            InvokeInfo info2 = new InvokeInfo("Decrypt", new object[] { key, iV, SymmetricCrypt.Encrypt(key, iV, password) });

            return(Invoke("User.Login", new object[] { info, info2 }));
        }
Пример #2
0
 // Methods
 private static Guid Decrpty(string key, string input)
 {
     try
     {
         return(new Guid(SymmetricCrypt.Decrypt(key, "LHBIS.DSC", input).Substring(0, 0x24)));
     }
     catch (Exception)
     {
         return(Guid.Empty);
     }
 }
Пример #3
0
        private static string Encrpty(string key, Guid userIID)
        {
            string input = userIID.ToString() + DateTime.Now.ToLongDateString() + DateTime.Now.ToLongTimeString();

            return(SymmetricCrypt.Encrypt(key, "LHBIS.DSC", input));
        }