Click here to Skip to main content
12,953,379 members (49,978 online)
Rate this:
 
Please Sign up or sign in to vote.
See more:
Hi guys..... with this codes below... i successfully encryt text but my problem is... i can't create a vice versa of this.... i mean a "DECRYPTER"... Please Help...... here's my code....



  Public Function pwdMd5Hash(ByVal String2Hash As String) As String
 
        Try
 
            Dim MD5Hasher As New System.Security.Cryptography.MD5CryptoServiceProvider()
 
 
 
            Dim oEncoder As New System.Text.ASCIIEncoding()
 
            Dim bytes As Byte() = oEncoder.GetBytes(String2Hash)
 
 
 
            Dim myHash As Byte() = MD5Hasher.ComputeHash(bytes)
 
            Dim myCapacity As Integer = 7
 
            Dim sb As System.Text.StringBuilder = New System.Text.StringBuilder(myCapacity)
 
            Dim I As Integer
 
            For I = 0 To myHash.Length - 1
 
                sb.Append(BitConverter.ToString(myHash, I, 1))
 
            Next I
 
            Return sb.ToString().TrimEnd(New Char() {" "c})
 
        Catch ex As Exception
 
            Return "0"
 
        End Try
Posted 22-Jul-12 15:16pm
Updated 22-Jul-12 15:22pm
Wes Aday104.2K
v2
Comments
Wes Aday 22-Jul-12 21:22pm
   
You do know that hashes are one way don't you?
iamsupergrasya 23-Jul-12 0:04am
   
i use a function in vb.net a encrypter and decrypter in one. just sharing.
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

As Wes said, a hash only goes one way. You can't turn a hash back in to the starting string.
  Permalink  
Comments
   
Of course, a 5.
--SA
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

Considering that MD5 is not an encryption algorithm, but is in fact a hash function (and a broken one at that), no there is no such thing as a decryptor for MD5.
  Permalink  
v2
Comments
   
Of course, a 5.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 6,429
CHill60 3,490
Maciej Los 3,103
Jochen Arndt 1,975
ppolymorphe 1,930


Advertise | Privacy | Mobile
Web02 | 2.8.170525.1 | Last Updated 22 Jul 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100