How to make a MD5 Text Encrypter
Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
7 posts
Page 1 of 1
Make your form like this:

The TextBox beside the button = TextBox1
The Other TextBox is = TextBox2
The Button = Button1,Text = Encrypt
Replace all the code with this code ;D

The TextBox beside the button = TextBox1
The Other TextBox is = TextBox2
The Button = Button1,Text = Encrypt
Replace all the code with this code ;D
Code: Select all
Please +rep! cooll;Public Class Form1
Public Shared Function MD5(ByVal Text As String, Optional ByVal Seperator As String = Nothing) As String
Dim Hash As Byte()
Dim Encoder As New System.Text.UTF8Encoding()
Dim Hasher As New System.Security.Cryptography.MD5CryptoServiceProvider()
Hash = Hasher.ComputeHash(Encoder.GetBytes(Text))
Text = Replace(BitConverter.ToString(Hash), "-", Seperator)
Return Text
End Function
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox2.Text = MD5(TextBox1.Text)
End Sub
End Class
Code It, you have excellent code in your tutorials, but what he means is, you should try to explain it better and stretch it out.
GoodGuy17 wrote:Code It, you have excellent code in your tutorials, but what he means is, you should try to explain it better and stretch it out.I don't know how to say it -.- dunnno;
Instead of telling us to replace all of the code with *code*, explain each line, and why it works like that. It would help us learn, instead of copy-pasta.
Yeah, use a ' after each line of your code to explain what each line means.
I can explain this if you want. In short it is just getting the hash as a byte array from MD5CryptoServiceProvider.ComputeHash, then converting it to a string with BitConverter.ToString(). BitConverter adds a - between each byte so this either replaces them with nothing or whatever the user specifies in the function.
GoodGuy17 wrote:Instead of telling us to replace all of the code with *code*, explain each line, and why it works like that. It would help us learn, instead of copy-pasta.I will try to explain the code more in another tutorial! cooll;
7 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023