MD5 Encryption For your project
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.
Hi, This is my first tutorial so I hope no one flames me :[
I'll be showing you guys how to add an MD5 Encryption into your project so for those people who use this as a password :
if textbox1.text = "password" then
bla bla
people can easily get your password :P
So to start out you put this at the top most of your form ( any )
get the hash and replace the red with your MD5
So here's how you use it
let's say you have a Textbox and a button
the button check to see if the password is correct in textbox1
this is what you would do
enteredpassword = getMD5Hash(Textbox1.Text)
If enteredpassword = password Then
something happens if the password is correct
Else
Something happen when the password is wrong
End If
Thanks for coming :]
I'll be showing you guys how to add an MD5 Encryption into your project so for those people who use this as a password :
if textbox1.text = "password" then
bla bla
people can easily get your password :P
So to start out you put this at the top most of your form ( any )
Code: Select all
Then put this right under your Public Class FormImports System.Security.Cryptography
Imports System.IO
Code: Select all
Now add this function, right under the above codePublic oFile As System.IO.File
Public password As String = [color=#FF0000]MD5 HASH HERE[/color] 'md5 hash of your password
Public enteredpassword As String
Public s As Stream
Code: Select all
Now you need to go on google and search for an MD5 encryptorFunction getMD5Hash(ByVal strToHash As String) As String
Dim md5Obj As New Security.Cryptography.MD5CryptoServiceProvider
Dim bytesToHash() As Byte = System.Text.Encoding.ASCII.GetBytes(strToHash)
bytesToHash = md5Obj.ComputeHash(bytesToHash)
Dim strResult As String = ""
For Each b As Byte In bytesToHash
strResult += b.ToString("x2")
Next
Return strResult
End Function
get the hash and replace the red with your MD5
So here's how you use it
let's say you have a Textbox and a button
the button check to see if the password is correct in textbox1
this is what you would do
enteredpassword = getMD5Hash(Textbox1.Text)
If enteredpassword = password Then
something happens if the password is correct
Else
Something happen when the password is wrong
End If
Thanks for coming :]
Last edited by NoWayIn on Sun Nov 29, 2009 7:44 am, edited 2 times in total.
You're welcome!
Just remember one thing though, do not give out which site you use to encrypt your MD5 because they can go on it and decrypt it!
unless you make your own MD5 Encryptor
Just remember one thing though, do not give out which site you use to encrypt your MD5 because they can go on it and decrypt it!
unless you make your own MD5 Encryptor
Hello,
Well ive learnt something new ;)
Good job NoWayIn cooll;
Well ive learnt something new ;)
Good job NoWayIn cooll;
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
Yes... I didn't know about MD5 Encryption System. Thanks pingpong 

Really? I thought you guys would think that this is just some nooby stuffs :P
HaHaHa nery very funny!
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;
Over 30 projects with source code!
Please give reputation to helpful members!
![Image]()
![Image]()
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;
Over 30 projects with source code!
Please give reputation to helpful members!

Copyright Information
Copyright © Codenstuff.com 2020 - 2023