import hashlib


def _digest_string(s):
    """
    Digests a string.

    Args:
        s: The string to digest.

    Return:
        A hex digest (a string).
    """
    m = hashlib.sha256()
    m.update(s.encode('utf8'))
    return m.hexdigest()