@Test public void testMd6() { String content = "helloi"; String encodeStr = MD6Util.md6(content); System.out.println("After md6 encode: " + encodeStr); boolean decodeStr = MD6Util.equal(encodeStr, content); System.out.println("is equal:" + decodeStr); }
public static String md6(String content) { Random rd = new Random(); int rd1 = rd.nextInt(35); rd = new Random(); int rd2 = rd.nextInt(35); String rdStr = String.valueOf(CHS_STR.charAt(rd1)) + String.valueOf(CHS_STR.charAt(rd2)); String str = DigestUtils.md5Hex(rdStr + content); str = rdStr + str.substring(0, 30); return str; }
MD6Util { public static String md6(String content) { Random rd = new Random(); int rd1 = rd.nextInt(35); rd = new Random(); int rd2 = rd.nextInt(35); String rdStr = String.valueOf(CHS_STR.charAt(rd1)) + String.valueOf(CHS_STR.charAt(rd2)); String str = DigestUtils.md5Hex(rdStr + content); str = rdStr + str.substring(0, 30); return str; } }
MD6Util { public static String md6(String content) { Random rd = new Random(); int rd1 = rd.nextInt(35); rd = new Random(); int rd2 = rd.nextInt(35); String rdStr = String.valueOf(CHS_STR.charAt(rd1)) + String.valueOf(CHS_STR.charAt(rd2)); String str = DigestUtils.md5Hex(rdStr + content); str = rdStr + str.substring(0, 30); return str; }  }
MD6Util { public static String md6(String content) { Random rd = new Random(); int rd1 = rd.nextInt(35); rd = new Random(); int rd2 = rd.nextInt(35); String rdStr = String.valueOf(CHS_STR.charAt(rd1)) + String.valueOf(CHS_STR.charAt(rd2)); String str = DigestUtils.md5Hex(rdStr + content); str = rdStr + str.substring(0, 30); return str; }  static String md6(String content); static boolean equal(String md6Str, String content); }
MD6Util { public static String md6(String content) { Random rd = new Random(); int rd1 = rd.nextInt(35); rd = new Random(); int rd2 = rd.nextInt(35); String rdStr = String.valueOf(CHS_STR.charAt(rd1)) + String.valueOf(CHS_STR.charAt(rd2)); String str = DigestUtils.md5Hex(rdStr + content); str = rdStr + str.substring(0, 30); return str; }  static String md6(String content); static boolean equal(String md6Str, String content);  }