Imports System
Imports System.IO
Imports System.Text
Imports System.Security
Imports System.Security.Cryptography
Public Class frmGenera
Public Function MD5(ByVal Word) As String
Dim Bytes() As Byte = ASCIIEncoding.ASCII.GetBytes(Word)
Dim md5h As New MD5CryptoServiceProvider
Dim Byt() As Byte = md5h.ComputeHash(Bytes)
Dim i As Integer = (Byt.Length * 2 + (Byt.Length / 8))
Dim StrBuild As StringBuilder = New StringBuilder(i)
Dim i2 As Integer
For i2 = 0 To Byt.Length - 1
StrBuild.Append(BitConverter.ToString(Byt, i2, 1))
Next i2
Return StrBuild.ToString().TrimEnd(New Char() {" "c}).ToLower
End Function
Private Sub frmGenera_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
End
End Sub
Private Sub cmdclean_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdclean.Click
txtint.Clear()
txtext.Clear()
End Sub
Private Sub cmdcod_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdcod.Click
txtext.Text = MD5(txtint.Text)
End Sub
Private Sub cmdcopy_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdcopy.Click
Clipboard.Clear()
Clipboard.SetDataObject(txtext.Text)
End Sub
End Class