xiaoyong931011
2023-10-23 df998a061e22b13297e02eee97e2418e4bbeaa1a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package cc.mrbird.febs.pay.util;
 
import org.apache.commons.codec.digest.DigestUtils;
 
/**
 * 类MD5_Sign:MD5签名和验签
 * 
 * @author Lori 2018年6月04日 下午16:10:04
 */
public class Md5_Sign {
 
    /**
     * MD5签名
     * 
     * @param requestSign 请求签名串
     * @param merchantKey 商户秘钥
     */
    public static String SignByMD5(String requestSign, String merchantKey) {
        
        String reqHmac = "";
        try {
            reqHmac = DigestUtils.md5Hex(requestSign + merchantKey).toUpperCase();
        } catch (Exception e) {}
        
        return reqHmac;
    }
}