code: public static String md5(final String message) {
          byte[] res;
  
          try {
              MessageDigest instance = MessageDigest.getInstance("MD5");
              instance.reset();
              instance.update(message.getBytes());
              res = instance.digest();
  
          } catch (final NoSuchAlgorithmException ex) {
              throw new RuntimeException(ex);
          }
  
          StringBuilder hexString = new StringBuilder();
          for (byte resByte : res) {
              hexString.append(Integer.toString((resByte & 0xff) + 0x100, 16).substring(1));
          }
  
          return hexString.toString();
      }
docs: Generates the MD5 checksum for the specified message.
  
  @param message The message.
  @return The hexadecimal checksum.