示例#1
0
        public bool login(string userName, string password)
        {
            bool result;

            try
            {
                string str = HttpWorker.HttpGet(TlqBaseClass.loginUrl + "/auth/tlqSdkAuthRestService", "userName="******"&password="******"0";
                if (flag)
                {
                    result = false;
                }
                else
                {
                    bool flag2 = loginResponseEntity.requestAuth != "1";
                    if (flag2)
                    {
                        result = false;
                    }
                    else
                    {
                        this.qcuName    = loginResponseEntity.qcuName;
                        this.queueName  = loginResponseEntity.releaseQueueName;
                        this.rcvQueName = loginResponseEntity.receiveQueueName;
                        result          = true;
                    }
                }
            }
            catch (Exception)
            {
                result = false;
            }
            return(result);
        }
示例#2
0
        public static string GetMD5String(string str)
        {
            MD5 mD = MD5.Create();

            byte[] bytes = Encoding.UTF8.GetBytes(str);
            byte[] data  = mD.ComputeHash(bytes);
            return(HttpWorker.GetbyteToString(data).ToLower());
        }