You are viewing our Forum Archives. To view or take place in current topics click here.
Simple (Text to MD5) - VB
Posted:

Simple (Text to MD5) - VBPosted:

TTG-PANDA
  • TTG Senior
Status: Offline
Joined: Mar 07, 201014Year Member
Posts: 1,408
Reputation Power: 76
Status: Offline
Joined: Mar 07, 201014Year Member
Posts: 1,408
Reputation Power: 76
1: create a new form, then add a button and two textbox's.

[ Register or Signin to view external links. ]

-------------

2: Now add this line line to your button.

txtoutput.text = StringToMD5(txtInput.Text)



it should look something like this.

[ Register or Signin to view external links. ]

-------------

3: Now you must add a Private Function. (it should go between End Sub and End Class)

Private Function StringToMD5(ByVal Content As String) As String


Should look like this.

[ Register or Signin to view external links. ]

-------------

4:Now you must add the rest of the code to the Private Function.

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


yet again, it should look something like this.

[ Register or Signin to view external links. ]

-------------

5: Now try to run the program.

[ Register or Signin to view external links. ]

just type "Hello" into TextBox1 and see what you get, if done right it should be "8b1a9953c4611296a827abf8c47804d7"
#2. Posted:
-Jordan-
  • TTG Addict
Status: Offline
Joined: Jul 12, 201013Year Member
Posts: 2,684
Reputation Power: 122
Status: Offline
Joined: Jul 12, 201013Year Member
Posts: 2,684
Reputation Power: 122
Helpful. Although I've never known a use for creating an MD5 hash in VB. Unless of course you're storing a password somewhere.
#3. Posted:
TTG-PANDA
  • TTG Senior
Status: Offline
Joined: Mar 07, 201014Year Member
Posts: 1,408
Reputation Power: 76
Status: Offline
Joined: Mar 07, 201014Year Member
Posts: 1,408
Reputation Power: 76
-Jordan- wrote Helpful. Although I've never known a use for creating an MD5 hash in VB. Unless of course you're storing a password somewhere.


yup, thats one use, you also can use it for experimenting with brute force/dictionary attacks.
#4. Posted:
JR33V3
  • TTG Undisputed
Status: Offline
Joined: Jul 14, 201013Year Member
Posts: 5,150
Reputation Power: 283
Status: Offline
Joined: Jul 14, 201013Year Member
Posts: 5,150
Reputation Power: 283
please explain to me what MD5 is exactly. i am confused >.>
#5. Posted:
-Jordan-
  • TTG Addict
Status: Offline
Joined: Jul 12, 201013Year Member
Posts: 2,684
Reputation Power: 122
Status: Offline
Joined: Jul 12, 201013Year Member
Posts: 2,684
Reputation Power: 122
JR33V3 wrote please explain to me what MD5 is exactly. i am confused >.>


MD5 is a one-way hash encryption. In simple, it converts any string into a 32 character hexadecimal (0-9 & A-F) string. It's main use is for encrypting stored data so that even in a way that makes it near to impossible to read by thieves.
#6. Posted:
TehKiwi
  • New Member
Status: Offline
Joined: Dec 07, 201013Year Member
Posts: 44
Reputation Power: 1
Status: Offline
Joined: Dec 07, 201013Year Member
Posts: 44
Reputation Power: 1
^
|

Right and wrong, right about everything except its main use. Its main use is for checking file signatures. Same with RSA.
#7. Posted:
Z61
  • V5 Launch
Status: Offline
Joined: Apr 16, 201014Year Member
Posts: 4,309
Reputation Power: 179
Status: Offline
Joined: Apr 16, 201014Year Member
Posts: 4,309
Reputation Power: 179
sorry but how do we do the opposite?
#8. Posted:
JR33V3
  • TTG Undisputed
Status: Offline
Joined: Jul 14, 201013Year Member
Posts: 5,150
Reputation Power: 283
Status: Offline
Joined: Jul 14, 201013Year Member
Posts: 5,150
Reputation Power: 283
zachman61 wrote sorry but how do we do the opposite?
the opposite is called decrypting which is harder i would say. idk how to decrypt
#9. Posted:
-Jordan-
  • TTG Addict
Status: Offline
Joined: Jul 12, 201013Year Member
Posts: 2,684
Reputation Power: 122
Status: Offline
Joined: Jul 12, 201013Year Member
Posts: 2,684
Reputation Power: 122
JR33V3 wrote
zachman61 wrote sorry but how do we do the opposite?
the opposite is called decrypting which is harder i would say. idk how to decrypt


MD5 can't be decrypted.
#10. Posted:
Aden
  • Christmas!
Status: Offline
Joined: Jun 26, 201013Year Member
Posts: 1,504
Reputation Power: 70
Status: Offline
Joined: Jun 26, 201013Year Member
Posts: 1,504
Reputation Power: 70
-Jordan- wrote
JR33V3 wrote
zachman61 wrote sorry but how do we do the opposite?
the opposite is called decrypting which is harder i would say. idk how to decrypt


MD5 can't be decrypted.


U sir are 100% wrong

Name me a program that cannot be cracked, whether encrypted with MD5 or anything for that matter!

-AIRBORN LLAMA (for this post only)
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.