Imports System.Security.Cryptography
Public Class Class1
Function Hashjm(ByVal TextToHash As String)
Dim SHA1 As SHA1CryptoServiceProvider
Dim bytValue() As Byte
Dim bytHash() As Byte
SHA1 = New SHA1CryptoServiceProvider
bytValue = System.Text.Encoding.UTF8.GetBytes(TextToHash)
bytHash = SHA1.ComputeHash(bytValue)
SHA1.Clear()
Return Convert.ToBase64String(bytHash)
End Function
Function Md5jm(ByVal TextToHash As String)
Dim md5 As MD5CryptoServiceProvider
Dim bytValue() As Byte
Dim bytHash() As Byte
md5 = New MD5CryptoServiceProvider
bytValue = System.Text.Encoding.UTF8.GetBytes(TextToHash)
bytHash = md5.ComputeHash(bytValue)
md5.Clear()
Return Convert.ToBase64String(bytHash)
End Function
End Class