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);新聞熱點
疑難解答