public virtual string[] PromptKeyboardInteractive(string destination, string name
                                                          , string instruction, string[] prompt, bool[] echo)
        {
            CredentialItem.StringType[] v = new CredentialItem.StringType[prompt.Length];
            for (int i = 0; i < prompt.Length; i++)
            {
                v[i] = new CredentialItem.StringType(prompt[i], !echo[i]);
            }
            IList <CredentialItem> items = new AList <CredentialItem>();

            if (instruction != null && instruction.Length > 0)
            {
                items.AddItem(new CredentialItem.InformationalMessage(instruction));
            }
            Sharpen.Collections.AddAll(items, Arrays.AsList(v));
            if (!provider.Get(uri, items))
            {
                return(null);
            }
            // cancel
            string[] result = new string[v.Length];
            for (int i_1 = 0; i_1 < v.Length; i_1++)
            {
                result[i_1] = v[i_1].GetValue();
            }
            return(result);
        }
 public virtual bool PromptPassphrase(string msg)
 {
     CredentialItem.StringType v = NewPrompt(msg);
     if (provider.Get(uri, v))
     {
         passphrase = v.GetValue();
         return(true);
     }
     else
     {
         passphrase = null;
         return(false);
     }
 }
		public virtual string[] PromptKeyboardInteractive(string destination, string name
			, string instruction, string[] prompt, bool[] echo)
		{
			CredentialItem.StringType[] v = new CredentialItem.StringType[prompt.Length];
			for (int i = 0; i < prompt.Length; i++)
			{
				v[i] = new CredentialItem.StringType(prompt[i], !echo[i]);
			}
			IList<CredentialItem> items = new AList<CredentialItem>();
			if (instruction != null && instruction.Length > 0)
			{
				items.AddItem(new CredentialItem.InformationalMessage(instruction));
			}
			Sharpen.Collections.AddAll(items, Arrays.AsList(v));
			if (!provider.Get(uri, items))
			{
				return null;
			}
			// cancel
			string[] result = new string[v.Length];
			for (int i_1 = 0; i_1 < v.Length; i_1++)
			{
				result[i_1] = v[i_1].GetValue();
			}
			return result;
		}