| | |
| | | import lombok.Data; |
| | | import lombok.experimental.Accessors; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.tomcat.util.security.MD5Encoder; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | |
| | | String str = String.format("action=%s&appkey=%s&channel=%s×tamp=%s&key=%s", this.getAction(), this.getAppkey(), this.getChannel(), this.getTimestamp(), secretkey); |
| | | log.info("待签名串:{}", str); |
| | | //MD5加密 |
| | | String encoder = MD5Util.getMD5(str); |
| | | String encoder = MD5Util.encoder(str); |
| | | //将签名结果转大写 |
| | | encoder = encoder.toUpperCase(); |
| | | log.info("签名结果:{}", encoder); |