Ejemplo n.º 1
0
 private HashMap<String, Object> createMap() {
   HashMap<String, Object> map = new HashMap<String, Object>();
   String desKey = XhtApplication.getInstance().getAuthenticateInfo().getDesKey();
   map.put("ClientCode", FunctionCode.DESKEY_CLIENTCODE);
   String workGUid = XhtApplication.getInstance().getAuthenticateInfo().getWorkGuid();
   try {
     map.put("WorkGuid", Des3Utils.des3EncodeECB(desKey, workGUid)); // 正式密钥加密
   } catch (Exception e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
   }
   return map;
 }
Ejemplo n.º 2
0
 private String createInputBody(HashMap<String, ?> inputBodyMap) throws Exception {
   String inputBodyJson = JSON.toJSONString(inputBodyMap);
   String desKey = XhtApplication.getInstance().getAuthenticateInfo().getDesKey();
   String inputBody = Des3Utils.des3EncodeECB(desKey, inputBodyJson);
   return inputBody;
 }