Browse Source

加密微信appid信息

develop-FileUpload-test
胡超1 2 years ago
parent
commit
20d37f66ad
  1. 19
      24Hour/WechatMessagerClient.cs

19
24Hour/WechatMessagerClient.cs

@ -2,6 +2,7 @@
using com.sun.xml.@internal.xsom;
using Elight.Utility;
using Elight.Utility.Code;
using Elight.Utility.Encrypt;
using Elight.Utility.Extensions;
using java.lang.annotation;
using java.util;
@ -9,6 +10,7 @@ using Microsoft.IdentityModel.Logging;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System.Runtime.Caching;
using System.Security.Cryptography;
using static java.security.cert.CertPathValidatorException;
namespace _24Hour
@ -56,15 +58,14 @@ namespace _24Hour
httpCliet.DefaultRequestHeaders.ConnectionClose = true;
_configuration = configuration;
appid = $"{configuration.GetSection("Wechat:appid").Value}";
secret = $"{configuration.GetSection("Wechat:secret").Value}";
secid = $"{configuration.GetSection("Wechat:secid").Value}";
Gzhappid = $"{configuration.GetSection("WechatGzh:appid").Value}";
Gzhsecret = $"{configuration.GetSection("WechatGzh:secret").Value}";
GzhtemplateId = $"{configuration.GetSection("WechatGzh:templateId").Value}";
TemplateIdSuccess = $"{configuration.GetSection("Wechat:templateIdSuccess").Value}";
TemplateIdFail = $"{configuration.GetSection("Wechat:templateIdFail").Value}";
TemplateIdFail = $"{configuration.GetSection("Wechat:templateIdFail").Value}";
appid =AES.Decrypt( $"{configuration.GetSection("Wechat:appid").Value}");
secret = AES.Decrypt($"{configuration.GetSection("Wechat:secret").Value}");
secid = AES.Decrypt($"{configuration.GetSection("Wechat:secid").Value}");
Gzhappid = AES.Decrypt($"{configuration.GetSection("WechatGzh:appid").Value}");
Gzhsecret = AES.Decrypt($"{configuration.GetSection("WechatGzh:secret").Value}");
GzhtemplateId = AES.Decrypt($"{configuration.GetSection("WechatGzh:templateId").Value}");
TemplateIdSuccess = AES.Decrypt($"{configuration.GetSection("Wechat:templateIdSuccess").Value}");
TemplateIdFail = AES.Decrypt($"{configuration.GetSection("Wechat:templateIdFail").Value}");
}
//小程序获取openId
public async Task<Result> GetOpenId(string code)

Loading…
Cancel
Save