示例#1
0
        /// <summary>
        /// Break input down into a list of Passphrases.
        /// </summary>
        /// <param name="input">The input string.</param>
        /// <returns>The input string converted into a list of Passphrases.</returns>
        private List <Passphrase> ParseInput(string input)
        {
            string[]          inputArray  = input.Split('\n');
            List <Passphrase> passphrases = new List <Passphrase>();

            foreach (string entry in inputArray)
            {
                Passphrase passphrase = new Passphrase();

                string[] words = entry.Split(' ');
                foreach (string word in words)
                {
                    passphrase.AddWord(word);
                }

                passphrases.Add(passphrase);
            }

            return(passphrases);
        }