Пример #1
0
        /// <summary>
        /// 加密
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        public string DesEncrypt <T>(string FunctionName, T t, string UToken = "")
        {
            ReqParam data = new ReqParam
            {
                FunctionName = FunctionName,
                TimeStamp    = DateTime.Now.ToString("yyyyMMddHHmmss"),
                MenKey       = "57d99d89caab482aa0e9a0a803eed3ba",
                UUId         = GenerateOrderNumber(),
                UToken       = UToken,//"/4EBFkILB5KW6Fj4nnqhj8NdB8CPJ9j3Yjn+ke6iEacUZbeHeWdeEkqwI3du5rleALEhaM4Xp/e1VVee8yvgGuJB5M/bZSUrAfG4Cg6cM/Ry/e5xvxdPnkiIKl4oK8ropVwWGJ8/m2xqCv2wuvenT/zi+URi4t5/YivDSMRkWNQ=",
                CType        = "2",
                DataContent  = JsonHelper.Serialize(t)
            };

            return(DESEncrypt.EncryptEncoding(JsonHelper.Serialize(data)));
        }
Пример #2
0
        /// <summary>
        /// 加密
        /// </summary>
        /// <returns></returns>
        public string ToMD5String()
        {
            string json = JsonHelper.Serialize(this);

            return(DESEncrypt.EncryptEncoding(json, aes_key));
        }