Esempio n. 1
0
def CreateAccount():
    console.out(16, 0.03)

    askCommand = True
    while (askCommand):
        newUser = input("")
        newPass = ""
        if (not ParseForCommand(newUser)):
            askCommand = False

    doesMatch = False
    while (not doesMatch):
        console.out(21)
        newPass = getpass.getpass("")
        if (not ParseForCommand(newPass)
            ):  #Only run rest of routine if input was not a command
            console.out(22)
            check = getpass.getpass("")

            if (newPass == check):
                doesMatch = True
            else:
                console.out(23)

    newSalt = Encryptor.GenerateSALT()
    encPass = Encryptor.OneWayEncryptor(newPass, newSalt)
    FileHandler.CreateUserAccount(newUser, encPass, newSalt)