Click here to Skip to main content
15,881,712 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I'm using this function to encrypt password but how do I decrypt it?

here's my code...
VB
Function MD5Hash(ByVal password As String)
        Dim md5 As MD5 = New MD5CryptoServiceProvider()
        Dim result As Byte()
        result = md5.ComputeHash(Encoding.ASCII.GetBytes(password))

        Dim strBuilder As New StringBuilder()

        For i As Integer = 0 To result.Length - 1
            strBuilder.Append(result(i).ToString("x2"))
        Next

        Return strBuilder.ToString()
    End Function
Posted
Updated 10-Oct-13 20:10pm
v2
Comments
Sergey Alexandrovich Kryukov 11-Oct-13 2:18am    
Why? The purpose of the cryptographic hash functions is not encryption. Just read about them.
—SA

Please see my comment to the question. It makes no sense. Please read:
http://en.wikipedia.org/wiki/Cryptographic_hash_function[^],
http://en.wikipedia.org/wiki/MD5[^].

Pay attention for M5 vulnerability (and also of SHA-1), so these functions are not recommended for application in security, but the function from the SHA-2 family can be used.

—SA
 
Share this answer
 
dude thats the point, you cant decrypt it....well you can if (for example) you store a large database of md5s
like these guys did

www.md5decrypter.co.uk/[^]

www.md5online.org/‎[^]

etc


same question asked here

http://stackoverflow.com/questions/9396590/is-md5-decryption-possible[^]

cheers
 
Share this answer
 
v3

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900