|
|
@ -23,8 +23,8 @@ public class SignatureUtil { |
|
|
|
* @return 签名 |
|
|
|
*/ |
|
|
|
public static String generateSignature(Map<String, String> parameters, String secret) throws UnsupportedEncodingException, NoSuchAlgorithmException { |
|
|
|
//1.对参数进行排序
|
|
|
|
Map<tring, String> treeMap=new TreeMap<>(parameters); |
|
|
|
//1.对参数进行排序
|
|
|
|
Map<String, String> treeMap = new TreeMap<>(parameters); |
|
|
|
// 2. 拼接参数字符串
|
|
|
|
String content = joinParameters(treeMap); |
|
|
|
|
|
|
|