Imports
System.text
Imports
System.security.cryptography.cryptography
Public
Class Form1
Class Form1 Inherits System.Windows.Forms.Form # Region "Windows Form Designer Generated Code" Public Sub New () Sub New () MyBase.new () 'This call is required for the Windows Form Designer. InitializationComponent () 'Add any initialized End Sub' form to clean up the component list after the initializeComponent () call. Protected Overloads Overrides Sub Dispose () Sub Dispose (ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose () End If End If MyBase.Dispose (disposing) End Sub 'Windows Form Designer Required Private Components as System.comPonentModel.icontainer 'Note: The following procedure is necessary to use the Windows Form Designer to modify this process using the Windows Form Designer. 'Don't modify it using the code editor.
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox Friend WithEvents TextBox2 As System.Windows.Forms.TextBox Friend WithEvents Button1 As System.Windows.Forms.Button
Me.ResumeLayout (False) End Sub # End Region Private Sub Button1_Click () Sub Button1_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim md5 As New MD5CryptoServiceProvider Dim username As Byte () = ( new ASCIIEncoding) .GetBytes (TextBox1.Text) 'is converted to a hash value Byte array Dim mdByte as Byte () = md5.ComputeHash (username)' Dim mdString as String = System.BitConverter.ToString (mdByte) Dim mdString as String = (New ASCIIEncoding) .GetString (mdByte) TextBox2.Text = mdString End Sub Private Sub Form1_Load () Sub Form1_Load (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End SubEnd ClassSystem.Security.Cryptography this Categories need to be referenced, it provides security services, used for MD5 just a furk