docs: def compute_ecc_hash(ecc_manager, hasher, buf, max_block_size, rate, message_size=None, as_string=False):
      '''Split a string in blocks given max_block_size and compute the hash and ecc for each block, and then return a nice list with both for easy processing.'''
      result = []
      # If required parameters were not provided, we compute them
      if not message_size:
          ecc_params = compute_ecc_params(max_block_size, rate, hasher)
          message_size = ecc_params["message_size"]
      # Split the buffer string in blocks (necessary for Reed-Solomon encoding because it's limited to 255 characters max)
      for i in xrange(0, len(buf), message_size):
          # Compute the message block
          mes = buf[i:i+message_size]
          # Compute the ecc
          ecc = ecc_manager.encode(mes)
          # Compute the hash
          hash = hasher.hash(mes)
          #crc = zlib.crc32(mes) # DEPRECATED: CRC is not resilient enough
          #print("mes %i (%i) - ecc %i (%i) - hash %i (%i)" % (len(mes), message_size, len(ecc), ecc_params["ecc_size"], len(hash), ecc_params["hash_size"])) # DEBUGLINE
  
          # Return the result (either in string for easy writing into a file, or in a list for easy post-processing)
          if as_string:
              result.append("%s%s" % (str(hash),str(ecc)))
          else:
              result.append([hash, ecc])
      return result