| | |
| | | import cc.mrbird.febs.common.contants.AppContants; |
| | | import cn.hutool.crypto.SecureUtil; |
| | | import cn.hutool.crypto.asymmetric.KeyType; |
| | | import cn.hutool.crypto.asymmetric.RSA; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import org.springframework.core.MethodParameter; |
| | | import org.springframework.http.MediaType; |
| | |
| | | return o; |
| | | } |
| | | |
| | | return SecureUtil.rsa(AppContants.REQ_PRIVATE_KEY, AppContants.REQ_PUBLIC_KEY).encryptBase64(JSONObject.toJSONString(o), KeyType.PrivateKey); |
| | | RSA rsa = new RSA(AppContants.RESP_PRIVATE_KEY, AppContants.RESP_PUBLIC_KEY); |
| | | return rsa.encryptBase64(JSONObject.toJSONString(o), KeyType.PublicKey); |
| | | } |
| | | } |