Пример #1
0
        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;
            }
        }
Пример #2
0
 public void Initialize(TPMConsole console)
 {
     _console = console;
 }
Пример #3
0
 public void Initialize(TPMConsole console)
 {
     _console = console;
 }