def get_bel_resource_hash(location, hash_function=None):
    """Get a BEL resource file and returns its semantic hash.

    :param str location: URL of a resource
    :param hash_function: A hash function or list of hash functions, like :func:`hashlib.md5` or :code:`hashlib.sha512`
    :return: The hexadecimal digest of the hash of the values in the resource
    :rtype: str
    :raises: pybel.resources.exc.ResourceError
    """
    resource = get_bel_resource(location)

    return hash_names(
        resource['Values'],
        hash_function=hash_function
    )