예제 #1
0
        /// <summary>
        /// 生成微信服务访问用的签名,访问微信服务器或访问.wx的服务需要用到的签证
        /// </summary>
        /// <param name="token"></param>
        /// <param name="timestamp"></param>
        /// <param name="noncestr"></param>
        /// <returns></returns>
        public static string GenWeixinVisitSign(string token, string timestamp, string noncestr)
        {
            string[] infos = new string[] { token, timestamp, noncestr };
            Array.Sort <string>(infos);
            string info = string.Format("{0}{1}{2}", infos[0], infos[1], infos[2]);

            return(WXBizMsgCrypt.GenSHASignKey(info, Encoding.ASCII));
        }
예제 #2
0
 /// <summary>
 /// 获取SHA算法的Sign签名,ASCII编码
 /// </summary>
 /// <param name="obj"></param>
 /// <returns></returns>
 public string GenSHASignKey(FrameDLRObject obj)
 {
     return(WXBizMsgCrypt.GenSHASignKey(obj, Encoding.ASCII));
 }