在终于解决了我的最后一个问题之后,我结束的代码是
Function MD5(ByVal strToHash As String) As String
Dim md5Obj As New Security.Cryptography.MD5CryptoServiceProvider
Dim bytesToHash() As Byte = System.Text.Encoding.ASCII.GetBytes(strToHash)
bytesToHash = md5Obj.ComputeHash(bytesToHash)
Dim strResult As String = ""
For Each b As Byte In bytesToHash
strResult += b.ToString("x2")
Next
Return strResult
End Function
Dim words As IEnumerable(Of String) = File.ReadLines(OpenFileDialog1.FileName)
For Each word As String In words
If String.Equals(MD5(word), hash.Text) Then
Label2.Text = word
Else : Label2.Text = "Hash Could Not Be Cracked"
End If
Next
现在,一旦散列字与我输入的散列匹配,我需要让它停止!