Created
December 9, 2016 15:52
-
-
Save David-Mimnagh/8a6b4ff2755e724370aad2733c4eadbb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
do | |
{ | |
Console.WriteLine("The index " + index + "."); | |
inputCopy = input; | |
inputCopy += index.ToString(); | |
data = md5Hash.ComputeHash(Encoding.UTF8.GetBytes(inputCopy)); | |
System.Text.StringBuilder sBuilder = new StringBuilder(); | |
for (int i = 0; i < data.Length; i++) | |
{ | |
sBuilder.Append(data[i].ToString("x2")); | |
} | |
string hash = sBuilder.ToString(); | |
if (hash.StartsWith("00000")) | |
{ | |
char pos = hash[5]; | |
if (Char.IsNumber(pos)) | |
{ | |
if (dataList.Count > 0) | |
{ | |
for (int i = 0; i < dataList.Count; i++) | |
{ | |
char[] chars = dataList[i].ToCharArray(); | |
if (chars[5] != pos) | |
possString = hash; | |
else | |
possString = ""; | |
} | |
if (possString != "") | |
dataList.Add(possString); | |
} | |
else | |
dataList.Add(hash); | |
} | |
} | |
index++; | |
} while (dataList.Count < 8); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment