import hashlib


def to_hash(string):
    """ Hash a string, in this case a url.

    :param str: a str containing an url
    :return str: a sha256 hashed string
    """
    hash_object = hashlib.sha256(bytes(string.encode("utf-8")))
    return hash_object.hexdigest()