Support Forums
[Visual Basic]Text to MD5[Tutorial] - Printable Version

+- Support Forums (https://www.supportforums.net)
+-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87)
+--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18)
+---- Forum: Visual Basic and the .NET Framework (https://www.supportforums.net/forumdisplay.php?fid=19)
+---- Thread: [Visual Basic]Text to MD5[Tutorial] (/showthread.php?tid=19718)

Pages: 1 2


[Visual Basic]Text to MD5[Tutorial] - Coding Support - 06-18-2011

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]



RE: [Visual Basic]Text to MD5[Tutorial] - LulzBoat - 06-20-2011

So how can we un-ecrypt the MD5? :-/ ?


RE: [Visual Basic]Text to MD5[Tutorial] - Coding Support - 06-20-2011

(06-20-2011, 09:07 PM)Cod3ing Wrote: So how can we un-ecrypt the MD5? :-/ ?
That would be called bruteforcing.




RE: [Visual Basic]Text to MD5[Tutorial] - ★ASI_F★™ - 06-20-2011

Thanks for share .


RE: [Visual Basic]Text to MD5[Tutorial] - cOld fus1on - 06-21-2011

Nice tutorial dude, I like this...
Thanks for sharing!


RE: [Visual Basic]Text to MD5[Tutorial] - RiChZ - 06-21-2011

Thanks For Sharing. Going to make my own and make a better GUI.


RE: [Visual Basic]Text to MD5[Tutorial] - ★ASI_F★™ - 06-22-2011

But i see one error in vb 2010


RE: [Visual Basic]Text to MD5[Tutorial] - Coding Support - 06-22-2011

(06-22-2011, 05:04 AM)reloaded Wrote: But i see one error in vb 2010
What error?

C + P it and post it as a response.




RE: [Visual Basic]Text to MD5[Tutorial] - ★Cooldude★ - 06-22-2011

(06-20-2011, 09:07 PM)Cod3ing Wrote: So how can we un-ecrypt the MD5? :-/ ?

It's not encrypted, it's hashed. Since hashing is a one way process, it is impossible to get the original value from the hash.


RE: [Visual Basic]Text to MD5[Tutorial] - Bigandrewgold - 06-27-2011

you forgot the end class statement in the final code

but otherwise good job