I am trying to calculate an MD5 checksum in .Net 2.0 and then 
compare it to the value I get from a MySQL query.
The MySQL query always returns a 32 character value where as .Net 
2.0 seems to always return a 24 character value.
Is there any way to modify the .Net version to be compatible with 
MySQL?

Here is my .Net code:

        Dim md5 As MD5CryptoServiceProvider
        Dim bytValue() As Byte
        Dim bytHash() As Byte

        ' Create New Crypto Service Provider Object
        md5 = New MD5CryptoServiceProvider

        ' Convert the original string to array of Bytes
        bytValue = System.Text.Encoding.UTF8.GetBytes(strInput)

        ' Compute the Hash, returns an array of Bytes
        bytHash = md5.ComputeHash(bytValue)
        md5.Clear()

        ' Return a base 64 encoded string of the Hash value
        strOutput = Convert.ToBase64String(bytHash)
        
        

        ' MySQL returns 1bbd886460827015e5d605ed44252251
        ' .Net returns G72IZGCCcBXl1gXtRCUiUQ==
        




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to