code: def generate_hashfile(directory, blacklist=_BLACKLIST):
      
      checksums = generate_checksums(directory, blacklist)
  
      out = ""
      for fn, checksum in sorted(checksums.items()):
          out += "%s %s\n" % (checksum, fn)
  
      return out
docs: Compute checksum for each file in `directory`, with exception of files
      specified in `blacklist`.
  
      Args:
          directory (str): Absolute or relative path to the directory.
          blacklist (list/set/tuple): List of blacklisted filenames. Only
                    filenames are checked, not paths!
  
      Returns:
          str: Content of hashfile as it is specified in ABNF specification for \
               project.