VB.net Function to match ColdFusion hash function
Posted on 2004-09-07
I am looking for some VB.net code to match the ColdFusion Function hash().
I am working on a Web/Client application that is caching some security on the client and needs to work in a disconnected environment using vb.net. the passwords have been saved after using the hash function.
here is a sample if the vb code I have tried but the result does not match the result from hash("test")
Dim md5Hasher As New MD5CryptoServiceProvider
Dim hashedBytes As Byte()
Dim encoder As New UTF8Encoding
hashedBytes = md5Hasher.ComputeHash(encoder.GetBytes("test"))
Dim hashString As String
hashString = Convert.ToBase64String(hashedBytes)