As of now I can hash listbox selected item with
Public Function Md5FromString(ByVal Source As String) As String
Dim Bytes() As Byte
Dim sb As New StringBuilder()
'Check for empty string.
If String.IsNullOrEmpty(Source) Then
Throw New ArgumentNullException
End If
'Get bytes from string.
Bytes = Encoding.Default.GetBytes(Source)
'Get md5 hash
Bytes = MD5.Create().ComputeHash(Bytes)
'Loop though the byte array and convert each byte to hex.
For x As Integer = 0 To Bytes.Length - 1
sb.Append(Bytes(x).ToString("x2"))
On Error Resume Next
Next
'Return md5 hash.
Return sb.ToString()
End Function
And collect them in another listbox, but I get an error (An unhandled exception of type 'System.StackOverflowException' occurred in System.Windows.Forms.dll) after about 4K somewhere random as if it fails to update a label or textbox then have to edit my list and reset and i just feel there is a better way to do this. Can someone more experienced offer some guidance in making this routine more efficient?