Return to Snippet

Revision: 26569
at April 30, 2010 18:45 by ptruta


Initial Code
Public Function MD5(ByVal str As String) As String
        Dim ASCIIenc As New ASCIIEncoding
        Dim strReturn
        Dim ByteSource() As Byte = ASCIIenc.GetBytes(str)
        Dim Md5Hash As New MD5CryptoServiceProvider
        Dim ByteHash() As Byte = Md5Hash.ComputeHash(ByteSource)
        For Each b As Byte In ByteHash
            strReturn &= b.ToString("x2")
        Next
        Return strReturn
    End Function

Initial URL
http://paulotruta.net

Initial Description


Initial Title
VB.NET md5 Hash

Initial Tags
Net

Initial Language
VB.NET