anar chiff
anar chiff

Reputation: 13

any way to Decrypt MD5CryptoServiceProvider

hey guys i wanted to know to create a decrypt function for this crypt function :

    public static string CreateHash(string unHashed)
    {
        System.Security.Cryptography.MD5CryptoServiceProvider x = new System.Security.Cryptography.MD5CryptoServiceProvider();
        byte[] data = System.Text.Encoding.ASCII.GetBytes(unHashed);
        data = x.ComputeHash(data);
        return System.Text.Encoding.ASCII.GetString(data);
    }

there is any way to decrypt function ?

hashes i got is like : ??????7hYkr?4??w

Upvotes: 0

Views: 1552

Answers (1)

Eloims
Eloims

Reputation: 5224

MD5 is a hash function.

So it's only one way: there is no practical way to decrypt it.

Read the introduction of the wikipedia article about cryptographic hash functions to understand how those behave.

However, if you have passwords encrypted with this function, and you want to check that a user provided password matches, you can encrypt the user provided string, and compare the result with the encrypted blob that is in your database (which is the most common use for those function).

Upvotes: 3

Related Questions