On Mon, 16 May 2005 16:16:46 -0700, "Andy Phillips"
<an***********@callatg.com> wrote:
I'm looking for an example that given any filename as input an MD5-Hash hex
output would be achieved.
Anyone have this?
Try this:
Public Function MD5_Hash(ByVal FileName As String) As String
Dim MD5Hasher As MD5
Dim fs As FileStream
Dim hash() As Byte
fs = File.Open(FileName, FileMode.Open)
hash = MD5Hasher.ComputeHash(fs)
fs.Close()
Return BitConverter.ToString(hash)
End Function
I haven't tested it yet, so post back and let me know who it works.
Tibby