ASP.NET: MD5 Hashing of Passwords
by Steve Hernandez on May.10, 2008, under Technology
Imports System.Security.Cryptography
   Function MD5_me(ByVal txt As String) As String
Dim strPlainText As String = txtPassword.Text
Dim hashedDataBytes As Byte()
Dim encoder As New UTF8Encoding()
Dim x As Integer
Dim hashedStr As String = “”
Dim md5Hasher As New MD5CryptoServiceProvider()
hashedDataBytes = md5Hasher.ComputeHash(encoder.GetBytes(strPlainText))
For x = 0 To hashedDataBytes.Length – 1
hashedStr += hashedDataBytes(x).ToString()
Next
MD5_me = hashedStr
End Function