package com.alipay.util; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Properties; public class SignatureHelper_return { public static String sign(Map params, String privateKey) { Properties properties = new Properties(); for (Iterator iter = params.keySet().iterator(); iter.hasNext();) { String name = (String) iter.next(); Object value = params.get(name); if (name == null || name.equalsIgnoreCase("sign") || name.equalsIgnoreCase("sign_type")) { continue; } properties.setProperty(name, value.toString()); } String content = getSignatureContent(properties); return sign(content, privateKey); } public static String getSignatureContent(Properties properties) { StringBuffer content = new StringBuffer(); List keys = new ArrayList(properties.keySet()); Collections.sort(keys); for (int i = 0; i < keys.size(); i++) { String key = (String) keys.get(i); String value = properties.getProperty(key); content.append((i == 0 ? "" : "&") + key + "=" + value); } return content.toString(); } public static String sign(String content, String privateKey) { if (privateKey == null) { return null; } String signBefore = content + privateKey; //System.out.print("signBefore=" + signBefore); return Md5Encrypt.md5(signBefore); } }

zj20020510 LV5
2023年9月18日
寒江雪2017 LV10
2023年8月2日
sunrandong LV4
2023年6月9日
17693282606 LV12
2022年7月10日
shuangerduo LV9
2022年6月26日
2998919365 LV5
2022年5月27日
georgejin LV9
2022年5月13日
不停的奔跑 LV20
2022年3月20日
wouldbb LV6
2021年12月18日
啊凯a LV2
2021年12月9日

lt6666
1月1日
暂无贡献等级
ma406805131 LV19
2024年12月18日
微信网友_7290996505972736 LV4
2024年12月11日
chinajy LV2
2024年12月8日
微信网友_7222576034680832 LV2
2024年10月23日
凌风丶 LV1
2024年9月19日
Ruler113
2024年9月10日
暂无贡献等级
kuyedie LV1
2024年6月23日
hlFDGd LV1
2024年6月11日
孤独的根号三 LV1
2024年5月8日