namespace WhiteRabbit { using System; using System.Collections.Generic; using System.Linq; using System.Security.Cryptography; using System.Text; /// /// Main class /// public static class Program { /// /// Main entry point /// public static void Main() { var processor = new Processor("poultry outwits ants", 3); foreach (var phrase in processor.GeneratePhrases(ReadInput())) { var hash = GetHash(phrase); Console.WriteLine(hash + ": " + phrase); } } private static string GetHash(string input) { using (MD5 hasher = MD5.Create()) { var data = hasher.ComputeHash(Encoding.UTF8.GetBytes(input)); return string.Concat(data.Select(b => b.ToString("x2"))); } } private static IEnumerable ReadInput() { string line; while ((line = Console.ReadLine()) != null) { yield return line; } } } }