Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Visual Basic]Text to MD5[Tutorial]
#1
This will teach you how to make a program that converts text to an MD5 Hash


Anything in Pink In my tutorial is important...

Step One(The GUI)
This part is simple. Just make the GUI Look similar to mine and move on to the next step(Step Two)



Step Two

Step Two will be coding the Convert Button.Double click it and input this code...
Code:
textbox2.text = StringToMD5(textbox1.Text)
Under the End Sub, put this code in...
Code:
Private Function StringToMD5(ByVal Content As String) As String

You should Have This code...
Code:
Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        TextBox1.Text = StringToMD5(TextBox2.Text)
    End Sub
    Private Function StringToMD5(ByVal Content As String) As String
End Class


Step Three

Under Your private function, use this code...
Code:
Dim M5 As New Security.Cryptography.MD5CryptoServiceProvider

        Dim ByteString() As Byte = System.Text.Encoding.ASCII.GetBytes(Content)
        ByteString = M5.ComputeHash(ByteString)

        Dim FinalString As String = Nothing
        For Each bt As Byte In ByteString
            FinalString &= bt.ToString("x2")
        Next
        Return FinalString
    End Function

Final Code



You are done, Test is by using the word hi.
It should look like this


[Image: 9be6c8d36c006d51ce24891f315d5e3a.png]
[Image: iddyEs.png]
Reply


Messages In This Thread
[Visual Basic]Text to MD5[Tutorial] - by Coding Support - 06-18-2011, 04:15 PM
RE: [Visual Basic]Text to MD5[Tutorial] - by H-Q - 06-27-2011, 02:31 PM
RE: [Visual Basic]Text to MD5[Tutorial] - by H-Q - 06-29-2011, 09:39 AM
RE: [Visual Basic]Text to MD5[Tutorial] - by ily - 06-29-2011, 09:41 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How To make an advanced Operating System in Visual Basic 2010 ? Mohamed Samir 9 11,636 01-15-2013, 09:30 PM
Last Post: Resistance
  [TUT] MD5 Encrypter & Finder [VB.NET] Fragma 12 7,151 11-25-2012, 10:36 PM
Last Post: ƃu∀ ıʞƃu∀
  [TuToRiAl] How to make Offline (No Internet) Captcha (Human Confirmation) [TuToRiAl] Resistance 24 11,367 08-30-2012, 10:14 PM
Last Post: Resistance
  [Visual Basic] FTP Uploader [Tutorial] Coding Support 6 2,808 08-12-2012, 12:36 AM
Last Post: Kenneth
  Visual Studio Bill Nye The Science Guy 1 917 03-19-2012, 09:08 AM
Last Post: BreShiE

Forum Jump:


Users browsing this thread: 1 Guest(s)