public static ProtectedPasswordStorage ReadPassword(string hintText, TPMConsole console, bool retypePw) { console.Out.Write (hintText); ConsoleKeyInfo consoleKeyInfo; ProtectedPasswordStorage[] pws; if(retypePw) pws = new ProtectedPasswordStorage[] { new ProtectedPasswordStorage (), new ProtectedPasswordStorage () }; else pws = new ProtectedPasswordStorage[] { new ProtectedPasswordStorage() }; for (int i = 0; i < pws.Length; i++) { ProtectedPasswordStorage pw = pws[i]; if (i == 1) console.Out.Write ("Retype password:"******"Error: Passwords do not match!"); return null; } }
public void Initialize(TPMConsole console) { _console = console; }