@Test public void encoderByMd5Test() { assertThat(MessageDigestUtil.encoderByMd5("0123456789")).isEqualTo("eB5eJF1ptWaXm4bijSPyxw=="); assertThat(MessageDigestUtil.encoderByMd5("apple")).isEqualTo("HzhwvidPbEmz4xoMZyiVfw=="); assertThat(MessageDigestUtil.checkEquals("0123456789", "eB5eJF1ptWaXm4bijSPyxw==")).isTrue(); }
public static String encoderByMd5(String str) { try { return new BASE64Encoder().encode(MessageDigest.getInstance("MD5").digest(str.getBytes("utf-8"))); } catch (Exception e) { throw new UncheckRuntimeException(e); } }
MessageDigestUtil { public static String encoderByMd5(String str) { try { return new BASE64Encoder().encode(MessageDigest.getInstance("MD5").digest(str.getBytes("utf-8"))); } catch (Exception e) { throw new UncheckRuntimeException(e); } } }
MessageDigestUtil { public static String encoderByMd5(String str) { try { return new BASE64Encoder().encode(MessageDigest.getInstance("MD5").digest(str.getBytes("utf-8"))); } catch (Exception e) { throw new UncheckRuntimeException(e); } }  }
MessageDigestUtil { public static String encoderByMd5(String str) { try { return new BASE64Encoder().encode(MessageDigest.getInstance("MD5").digest(str.getBytes("utf-8"))); } catch (Exception e) { throw new UncheckRuntimeException(e); } }  static String encoderByMd5(String str); static boolean checkEquals(String str, String encoderStr); }
MessageDigestUtil { public static String encoderByMd5(String str) { try { return new BASE64Encoder().encode(MessageDigest.getInstance("MD5").digest(str.getBytes("utf-8"))); } catch (Exception e) { throw new UncheckRuntimeException(e); } }  static String encoderByMd5(String str); static boolean checkEquals(String str, String encoderStr);  }