| | |
| | | response.setContentType("application/json; charset=utf-8"); |
| | | |
| | | FebsResponse code = new FebsResponse().code(HttpStatus.UNAUTHORIZED); |
| | | String encryptBase64 = SecureUtil.rsa(AppContants.RESP_PRIVATE_KEY, AppContants.RESP_PUBLIC_KEY).encryptBase64(JSONObject.toJSONString(code).getBytes(), KeyType.PublicKey); |
| | | response.getWriter().write(new ObjectMapper().writeValueAsString(encryptBase64)); |
| | | // String encryptBase64 = SecureUtil.rsa(AppContants.RESP_PRIVATE_KEY, AppContants.RESP_PUBLIC_KEY).encryptBase64(JSONObject.toJSONString(code).getBytes(), KeyType.PublicKey); |
| | | response.getWriter().write(new ObjectMapper().writeValueAsString(code)); |
| | | } |
| | | |
| | | public static void main(String[] args) { |