public static void main(String[] args) { String url = "http://127.0.0.1:80/jhj-hyb-openapi/member/save/register"; String[] urlArr = url.split("/"); System.out.println("urlArr length:" + urlArr.length); for (String str : urlArr) { System.out.println(str); } System.out.println( JhjEncryptUtil.MD5HexString("20160101wx" + SaltConstant.ALLIANCE_MEMBER_PASS_SALT)); }
/** * 生成待加密字符串明文 * * @param module * @param cat * @param methodName * @param alliPin * @param encriptAlliPass * @param reqTimeStr * @return */ private String getPlaintext4Encript( String module, String cat, String methodName, String alliPin, String encriptAlliPass, String reqTimeStr) { String plaintext = module + "." + cat + "." + methodName + "-" + alliPin + "&" + encriptAlliPass + "&" + reqTimeStr; // System.out.println(plaintext); return JhjEncryptUtil.MD5HexString(plaintext.toLowerCase()); }