Public Function Md5AddSecret(ByVal strChange As String) As String
Dim pass() As Byte = Encoding.UTF8.GetBytes(strChange)
Dim md5 As MD5 = New MD5CryptoServiceProvider()
Dim strPassword As String = Encoding.UTF8.GetString(md5.ComputeHash(pass))
Return strPassword
End Function
Date :
2009-02-07 07:23:10
By :
webmaster
No. 3
Guest
Code (VB.NET)
Function MD5hash(Byval strPlainText As String) As Byte()
Dim md5 As New MD5CryptoServiceProvider()
Dim encoder as New UTF8Encoding()
? Convert PlainText เป็น Array Bytes
Dim result As Byte() = md5.ComputeHash(encoder.GetBytes(strPlainText))