Advertisement
ZeekoSec

MD5 in VB.NET

Apr 7th, 2015
522
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.31 KB | None | 0 0
  1. Private Function GenerateHash(ByVal SourceText As String) As String
  2. Dim Ue As New UnicodeEncoding()
  3. Dim ByteSourceText() As Byte = Ue.GetBytes(SourceTStext)
  4. Dim Md5 As New MD5CryptoServiceProvider()
  5. Dim ByteHash() As Byte = Md5.ComputeHash(ByteSourceText)
  6. Return Convert.ToBase64String(ByteHash)
  7. End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement