SHA1加密:
string[] ArrTmp = { Token, timestamp, nonce };Array.Sort(ArrTmp);//字典排序string tmpStr = string.Join("", ArrTmp);HashAlgorithm sha1 = System.Security.Cryptography.SHA1.Create(); byte[] data =sha1.ComputeHash(Encoding.UTF8.GetBytes(tmpStr)); // 请注意选择你的 EncodingtmpStr = BitConverter.ToString(data);
新闻热点
疑难解答