MD5s { public static boolean isBase64(String value) { try { BaseEncoding.base64().decode(value); return (value.length() == 24); } catch (IllegalArgumentException e) { return false; } }  static String toBase64(String hexMd5); static String toHex(String base64Md5); static boolean isBase64(String value); static boolean isHex(String value); static boolean isEqual(String firstMD5, String secondMD5);  }
@Test public void is_base64() { assertThat(MD5s.isBase64(MD5_BASE64_2)).isTrue(); }
@Test public void is_not_base64() { assertThat(MD5s.isBase64(MD5_HEX_2)).isFalse(); }