Exemplo n.º 1
0
        public string[] GetUserInfo()
        {
            string[]   sUserInfo = new string[2];
            Crypto3DES DesObject = new Crypto3DES();

            DesObject.Key = sDESKey;
            sUserInfo[0]  = DesObject.Decrypt3DES(Request.Cookies["UserInfo"]["account"].ToString());
            sUserInfo[1]  = DesObject.Decrypt3DES(Request.Cookies["UserInfo"]["pwd"].ToString());
            return(sUserInfo);
        }
Exemplo n.º 2
0
        public int GetUserID()
        {
            Crypto3DES DesObject = new Crypto3DES();

            DesObject.Key = sDESKey;
            int iUserID = 0;

            if (Request.Cookies["UserID"] != null)
            {
                string sDesUserID = DesObject.Decrypt3DES(Request.Cookies["UserID"].Value);
                int.TryParse(sDesUserID, out iUserID);
            }
            return(iUserID);
        }