import string
import random
import hashlib


def generate_hash_key(salt, random_str_size=6):
    """Generates a hash key.

    Parameters
    ----------
    salt : str
        A user personal information.
    random_str_size : int, optional
        The length of the random key, by default 6

    Returns
    -------
    str
        A hash object digested as a string.
    """
    chars = string.ascii_uppercase + string.digits
    random_str = "".join(random.choice(chars) for i in range(random_str_size))
    text = random_str + salt
    return hashlib.sha224(text.encode('utf-8')).hexdigest()