コード例 #1
0
ファイル: SecurityUtils.cs プロジェクト: modulexcite/pash-1
        internal static SecureString PromptForSecureString(PSHostUserInterface hostUI, string prompt)
        {
            hostUI.Write(prompt);
            SecureString secureString = hostUI.ReadLineAsSecureString();

            hostUI.WriteLine("");
            return(secureString);
        }
コード例 #2
0
        public override SecureString ReadLineAsSecureString()
        {
            if (externalUI == null)
            {
                throw new InvalidOperationException("Unable to ReadLineAsSecureString from host in headless session");
            }

            return(externalUI.ReadLineAsSecureString());
        }
コード例 #3
0
        public override SecureString ReadLineAsSecureString()
        {
            if (externalUI == null)
            {
                throw new InvalidOperationException();
            }

            return(externalUI.ReadLineAsSecureString());
        }
コード例 #4
0
        /// <summary>
        /// present a prompt for a SecureString data
        /// </summary>
        ///
        /// <param name="hostUI"> ref to host ui interface </param>
        ///
        /// <param name="prompt"> prompt text </param>
        ///
        /// <returns> user input as secure string </returns>
        ///
        /// <remarks>  </remarks>
        ///
        internal static SecureString PromptForSecureString(PSHostUserInterface hostUI,
                                                           string prompt)
        {
            SecureString ss = null;

            hostUI.Write(prompt);
            ss = hostUI.ReadLineAsSecureString();
            hostUI.WriteLine(string.Empty);

            return(ss);
        }
コード例 #5
0
ファイル: Tracer.cs プロジェクト: svetek/Profiler
 public override SecureString ReadLineAsSecureString()
 {
     return(_ui.ReadLineAsSecureString());
 }