Exemple #1
0
        public static string GetSign(string fromUserName, string toUserName, string nonceStr, string timeStamp)
        {
            //第一步,对所有需要传入的参数加上appkey作一次key=value字典序的排序
            string keyvaluestring = "fromUserName="******"&toUserName="******"&nonceStr=" + nonceStr + "&timeStamp=" + timeStamp + "&appkey=" + WineyunAppkey;

            return(KSHA1Util.Sha1(keyvaluestring));
        }
Exemple #2
0
 private static string GetToken(string timeStamp, string nonceStr, int groupid, int userid)
 {
     return(KSHA1Util.Sha1("userid=" + userid + "&groupid=" + groupid + "&timestamp=" + timeStamp + "&noncestr=" + nonceStr + "&key=" + KAuthConfig.YijinTokenKey));
 }