Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
请注意,LDAP目录管理器和安全增强目录管理器不支持JSON API身份验证中的哈希密码。
md5(username + “::” + md5Base16(password));
例如:假设用户名是“admin”,密码是“admin”,则得到的HASH值应该是“ 14ACD782DCFEB2BCDE2B271CCD559477 ”。
public static String md5(String content) { try { MessageDigest m = MessageDigest.getInstance("MD5"); byte[] data = content.getBytes(); m.update(data, 0, data.length); BigInteger i = new BigInteger(1, m.digest()); return String.format("%1$032X", i); } catch (Exception ex) {} return ""; } public static String md5Base16(String content) { try { MessageDigest md = MessageDigest.getInstance("MD5"); byte[] bytes = md.digest(content.getBytes()); StringBuffer sb = new StringBuffer(); for (int i = 0; i < bytes.length; i++) { byte b = bytes[i]; String hex = Integer.toHexString((int) 0x00FF & b); if (hex.length() == 1) { sb.append("0"); } sb.append(hex); } return sb.toString(); } catch (Exception e) {} return ""; }