VB.NET md5 Hash


/ Published in: VB.NET
Save to your folder(s)



Copy this code and paste it in your HTML
  1. Public Function MD5(ByVal str As String) As String
  2. Dim ASCIIenc As New ASCIIEncoding
  3. Dim strReturn
  4. Dim ByteSource() As Byte = ASCIIenc.GetBytes(str)
  5. Dim Md5Hash As New MD5CryptoServiceProvider
  6. Dim ByteHash() As Byte = Md5Hash.ComputeHash(ByteSource)
  7. For Each b As Byte In ByteHash
  8. strReturn &= b.ToString("x2")
  9. Next
  10. Return strReturn
  11. End Function

URL: http://paulotruta.net

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.