/// <summary> /// client发来的token,解析成对象.失败返回null /// </summary> /// <param name="token"></param> /// <returns></returns> public static AccountM ParseToken(string token) { string sign = token.Substring(token.Length - 64); string userAes = token.Substring(0, token.Length - 64); // userjson string userjson = SecurityHelp.AESDecrypt(userAes, aesKey16); if (userjson == null) { return(null); } // AccountM user = SerializeHelp.JsonToObject <AccountM>(userjson); user.Sign = sign; user.JsonStr = userjson; return(user); }