import hashlib


def calculate_identicon(user_id: str) -> str:
    """
    Calculate an identicon hash string based on a user name.

    :param user_id: the user name
    :return: an identicon string

    """
    return hashlib.sha256(user_id.encode()).hexdigest()