import hashlib


def forge_secret_key(tag_random_str: str, pin: str) -> str:
    """
    This function merges the tag random string with the 
    pin, then hash them using SHA3-512 to create the final 
    secret key for unlock a user's password vault.
    """
    merged_key = tag_random_str[0:-len(pin)] + pin
    m = hashlib.sha3_256(merged_key.encode('utf-8'))
    return m.hexdigest()