| | |
| | | package com.ruoyi.integration.barrierGate.model; |
| | | |
| | | import com.alibaba.nacos.common.utils.MD5Utils; |
| | | import com.ruoyi.common.core.utils.MD5Util; |
| | | import lombok.Data; |
| | | import lombok.experimental.Accessors; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.tomcat.util.security.MD5Encoder; |
| | | |
| | | import java.nio.charset.Charset; |
| | | |
| | | /** |
| | | * @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.encoder(str); |
| | | String encoder = MD5Util.getMD5(str); |
| | | //将签名结果转大写 |
| | | encoder = encoder.toUpperCase(); |
| | | log.info("签名结果:{}", encoder); |
| | | this.setSign(encoder); |
| | | return this; |
| | | } |
| | | |
| | | } |