S
Shaun Merrill
This function doesn't seem to be giving me the appearance I expect. This
should appear more like
"1ba442ab45c8002a86d068d1c1748e44" but it looks really cryptic and screwy,
like "óìØLÜzrVÊ%' \Y7".
Here is my code segment written in VB.NET Enterprise Architect:
--------
Public Function MD5File(ByVal Filename As String) As String
'
' Read a file, produce an MD5 hashed key value in a String.
'
With New Security.Cryptography.MD5CryptoServiceProvider
Dim result() As Byte = .ComputeHash( New
IO.StreamReader(Filename).BaseStream )
Dim Encoding As Text.Encoding = System.Text.Encoding.Default
Return Encoding.GetString(result)
Encoding = Nothing
.Clear()
End With
End Function
---------
Perhaps you can suggest a modification to my code which yields a more
hex-like string. I'm new to VB.NET, but I love it so far.
Thanks,
~ Shaun
near Seattle, WA
should appear more like
"1ba442ab45c8002a86d068d1c1748e44" but it looks really cryptic and screwy,
like "óìØLÜzrVÊ%' \Y7".
Here is my code segment written in VB.NET Enterprise Architect:
--------
Public Function MD5File(ByVal Filename As String) As String
'
' Read a file, produce an MD5 hashed key value in a String.
'
With New Security.Cryptography.MD5CryptoServiceProvider
Dim result() As Byte = .ComputeHash( New
IO.StreamReader(Filename).BaseStream )
Dim Encoding As Text.Encoding = System.Text.Encoding.Default
Return Encoding.GetString(result)
Encoding = Nothing
.Clear()
End With
End Function
---------
Perhaps you can suggest a modification to my code which yields a more
hex-like string. I'm new to VB.NET, but I love it so far.
Thanks,
~ Shaun
near Seattle, WA