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:
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.
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)
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.
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"
[ 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:
Status: Offline
Joined: Jul 12, 201014Year Member
Posts: 2,684
Reputation Power: 122
Status: Offline
Joined: Jul 12, 201014Year 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.
- 0useful
- 0not useful
#3. Posted:
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.
- 0useful
- 0not useful
#4. Posted:
Status: Offline
Joined: Jul 14, 201014Year Member
Posts: 5,150
Reputation Power: 283
Status: Offline
Joined: Jul 14, 201014Year Member
Posts: 5,150
Reputation Power: 283
please explain to me what MD5 is exactly. i am confused >.>
- 0useful
- 0not useful
#5. Posted:
Status: Offline
Joined: Jul 12, 201014Year Member
Posts: 2,684
Reputation Power: 122
Status: Offline
Joined: Jul 12, 201014Year 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.
- 0useful
- 0not useful
#6. Posted:
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.
|
Right and wrong, right about everything except its main use. Its main use is for checking file signatures. Same with RSA.
- 0useful
- 0not useful
#7. Posted:
Status: Offline
Joined: Apr 16, 201014Year Member
Posts: 4,309
Reputation Power: 179
sorry but how do we do the opposite?
- 0useful
- 0not useful
#8. Posted:
Status: Offline
Joined: Jul 14, 201014Year Member
Posts: 5,150
Reputation Power: 283
Status: Offline
Joined: Jul 14, 201014Year 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
- 0useful
- 0not useful
#9. Posted:
Status: Offline
Joined: Jul 12, 201014Year Member
Posts: 2,684
Reputation Power: 122
Status: Offline
Joined: Jul 12, 201014Year Member
Posts: 2,684
Reputation Power: 122
JR33V3 wrotezachman61 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.
- 0useful
- 0not useful
#10. Posted:
Status: Offline
Joined: Jun 26, 201014Year Member
Posts: 1,504
Reputation Power: 70
-Jordan- wroteJR33V3 wrotezachman61 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)
- 0useful
- 0not useful
You are viewing our Forum Archives. To view or take place in current topics click here.