Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_beginners thread: MD5 Problems


Message #1 by "Mitchell Adams" <MADAMS@p...> on Wed, 06 Nov 2002 16:27:41 -0500
I need to validate a previously encrypted string which is stored in a 
binary Sql database field against what the user submits:

'Encrypt the user submitted password
Dim md5Hasher as New MD5CryptoServiceProvider()
Dim encoder as New UTF8Encoding()
Dim HashedBytes as Byte()
HashedBytes =3D md5Hasher.ComputeHash(encoder.GetBytes(Password.Text))

'check against a database.
If DataReader("Password").ToString =3D HashedBytes.ToString


The above code isn't working.  Do I need to convert something here?

any help is appreciated.

Here is the article I'm working off of:
http://aspnet.4guysfromrolla.com/articles/103002-1.aspx


  Return to Index