def METHOD_NAME(self, file, algo):
    self._validateAlgo(algo)
    if algo not in file:
        raise RestException('This file does not have the %s hash computed.' % algo)
    keyFileBody = '%s\n' % file[algo]
    name = '.'.join((file['name'], algo))
    setResponseHeader('Content-Length', len(keyFileBody))
    setResponseHeader('Content-Type', 'text/plain')
    setContentDisposition(name)
    setRawResponse()
    return keyFileBody