code: public static String digestMD5(String message, String charset) {
          try {
              byte[] strTemp = message.getBytes(charset);
              MessageDigest mdTemp = MessageDigest.getInstance("MD5");
              mdTemp.update(strTemp);
              byte[] md = mdTemp.digest();
              int j = md.length;
              char[] chars = new char[j * 2];
              int k = 0;
              for (byte b : md) {
                  chars[k++] = HEX_DIGITS[b >>> 4 & 0xf];
                  chars[k++] = HEX_DIGITS[b & 0xf];
              }
              return new String(chars);
          } catch (Exception e) {
              throw new IllegalArgumentException(e.getMessage(), e);
          }
      }
docs: 计算MD5值
  
  @param message 字符串
  @param charset 编码
  @return MD5