static string str = "abcdefghijklmnoparstuvwxyzABCDEFGHIJKLMNOPaRSTUVWXYZ0123456789"; static void Main(string[] args) { string ac = Console.ReadLine(); for (int a = 0; (a < str.Length); a++) { for (int b = 0; (b < str.Length); b++) { for (int c = 0; (c < str.Length); c++) { for (int d = 0; d < 3; d++) { for (int d1 = 3; d1 < 6; d1++) { string s111 = str[a].ToString() + str[b].ToString() + str[c].ToString() + str[d].ToString(); string s112 = str[a].ToString() + str[b].ToString() + str[c].ToString() + str[d1].ToString(); MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider(); Byte[] bytes4MD5 = Encoding.UTF8.GetBytes(s111); byte[] checkSum = md5.ComputeHash(bytes4MD5); string result = BitConverter.ToString(checkSum).Replace("-", String.Empty); if (result.ToLower().StartsWith(ac)) { Console.WriteLine(s111 + ":" + result.ToLower()); } } } } } } }
I have this code, and there is only one problem: how can I ensure that not only the string s111 is hashed , but also the string s112 ?
PS Tried Byte[] bytes4MD5 = Encoding.UTF8.GetBytes(s111, s112);
but the piece of iron does not understand such record.