I want to get MD5 value of a string. Searched and found an answer in stackoverflow.
Code:
Private Function GenerateHash(ByVal SourceText As String) As String
Dim Ue As New UnicodeEncoding()
Dim ByteSourceText() As Byte = Ue.GetBytes(SourceText)
Dim Md5 As New MD5CryptoServiceProvider()
Dim ByteHash() As Byte = Md5.ComputeHash(ByteSourceText)
Return Convert.ToBase64String(ByteHash)
End Function
But I need plain MD5, not base64 encoded. Return Convert.ToString(ByteHash) didn’t help me. So need your instruction.
Thanks
All u need was to covert the
Byte[]toStringInstead ofBase64encoded stringFixed Function :