code: public static byte[] md5Bytes(String str) {
          if (str == null) return null;
          MessageDigest md5;
          try {
              md5 = MessageDigest.getInstance("MD5");
          } catch (NoSuchAlgorithmException ex) {
              throw new RuntimeException(ex);
          }
          return md5.digest(str.getBytes());
      }
docs: MD5加密
  
  @param str 待加密数据
  
  @return md5值