import getpass


def prompt_for_new_password() -> str:
    """ Prompt the user to enter a new password, with confirmation """
    while True:
        passw: str  = getpass.getpass()
        passw2: str = getpass.getpass()
        if passw == passw2: return passw
        else: print('Passwords do not match')