'Provides the digest of our descriptor\'s content in a given range.
:param bytes start: start of the range to generate a digest for
:param bytes end: end of the range to generate a digest for
:returns: the digest string encoded in uppercase hex
:raises: ValueError if the digest canot be calculated'

def _digest_for_content(self, start, end):

    raw_descriptor = self.get_bytes()
    start_index = raw_descriptor.find(start)
    end_index = raw_descriptor.find(end, start_index)
    if (start_index == (-1)):
        raise ValueError(("Digest    is    for    the    range    starting    with    '%s'    but    that    isn't    in    our    descriptor" % start))
    elif (end_index == (-1)):
        raise ValueError(("Digest    is    for    the    range    ending    with    '%s'    but    that    isn't    in    our    descriptor" % end))
    digest_content = raw_descriptor[start_index:(end_index + len(end))]
    digest_hash = hashlib.sha1(stem.util.str_tools._to_bytes(digest_content))
    return stem.util.str_tools._to_unicode(digest_hash.hexdigest().upper())
