Is it possible to get an MD5 Hash of an Object.
Here is my code:
Or does the Object.GetHashCode() method basically do this?
Here is my code:
Code:
Public Function MD5CalcObject(ByVal ObjectToCheck As Object) As String
Try
Using md5 As New System.Security.Cryptography.MD5CryptoServiceProvider
Dim hash() As Byte = md5.ComputeHash(ObjectToCheck) 'Error is here
Return ByteArrayToString(hash)
End Using
Catch Exception As Exception
MessageBox.Show(Exception.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Function