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)); }
private static string GetToken(string timeStamp, string nonceStr, int groupid, int userid) { return(KSHA1Util.Sha1("userid=" + userid + "&groupid=" + groupid + "×tamp=" + timeStamp + "&noncestr=" + nonceStr + "&key=" + KAuthConfig.YijinTokenKey)); }