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.
16 posts Page 1 of 2
NoWayIn
VIP - Donator
VIP - Donator
Posts: 444
Joined: Sat Nov 21, 2009 11:16 pm

MD5 Encryption For your project
NoWayIn
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 )
Code: Select all
Imports System.Security.Cryptography
Imports System.IO
Then put this right under your Public Class Form
Code: Select all
Public 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
Now add this function, right under the above code
Code: Select all
Function 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
Now you need to go on google and search for an MD5 encryptor
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.
User avatar
Miutubevids
VIP-Member
VIP-Member
Posts: 293
Joined: Mon Nov 23, 2009 11:39 am

cool thanks
Don't BS the BSer

RePlay V1.0 - Record your Mouse Clicks, Mouse Movments and Keystrokes
AutoClicker v1.0
SnowScreen
Reaction Timer Game V1.0
NoWayIn
VIP - Donator
VIP - Donator
Posts: 444
Joined: Sat Nov 21, 2009 11:16 pm

Re: MD5 Encryption For your project
NoWayIn
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
User avatar
Normall
Member
Member
Posts: 49
Joined: Wed Nov 25, 2009 9:25 pm

Re: MD5 Encryption For your project
Normall
Thanks for sharing
NoWayIn
VIP - Donator
VIP - Donator
Posts: 444
Joined: Sat Nov 21, 2009 11:16 pm

Re: MD5 Encryption For your project
NoWayIn
No Problem!
User avatar
CodenStuff
Site Admin
Site Admin
Posts: 4392
Joined: Tue Aug 04, 2009 1:47 am

Hello,

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.
User avatar
Nery
Co-Admin Moderator
Co-Admin Moderator
Posts: 1117
Joined: Mon Sep 07, 2009 8:11 pm

Re: MD5 Encryption For your project
Nery
Yes... I didn't know about MD5 Encryption System. Thanks pingpong :)
NoWayIn
VIP - Donator
VIP - Donator
Posts: 444
Joined: Sat Nov 21, 2009 11:16 pm

Re: MD5 Encryption For your project
NoWayIn
Really? I thought you guys would think that this is just some nooby stuffs :P
User avatar
Nery
Co-Admin Moderator
Co-Admin Moderator
Posts: 1117
Joined: Mon Sep 07, 2009 8:11 pm

Re: MD5 Encryption For your project
Nery
Actually I've never heard about such thing.
User avatar
MrAksel
C# Coder
C# Coder
Posts: 1758
Joined: Fri Mar 26, 2010 12:27 pm

Re: MD5 Encryption For your project
MrAksel
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
16 posts Page 1 of 2
Return to “Tutorials”