Example #1
0
        private string GetPassPhrase(string fileName)
        {
            string result;

            using (PassPhrase dialog = new PassPhrase(fileName))
            {
                dialog.ShowDialog();
                _PassPhraseUpdate = Default.StorePassPhrases;
                result            = dialog.Password;
            }
            return(result);
        }
Example #2
0
        private string GetInteractiveMethod(DSMKeyboardInteractiveEventArgs e)
        {
            List <string> banner = new List <string>();

            banner.AddRange(e.Banner.Split('\n'));
            banner.AddRange(e.Instruction.Split('\n'));

            string result;

            using (PassPhrase dialog = new PassPhrase(e.Username, banner.ToArray(), e.Id + ": " + e.Request))
            {
                dialog.ShowDialog();
                result = dialog.Password;
            }
            return(result);
        }