Decrypt MD5 [duplicate]

2

I need to change this code to decrypt the data encrypted with it:

public static string MD5HashCrypt(string text)
{
    MD5 md5 = new MD5CryptoServiceProvider();

    //compute hash from the bytes of text
    md5.ComputeHash(ASCIIEncoding.ASCII.GetBytes(text));

    //get hash result after compute it
    byte[] result = md5.Hash;

    StringBuilder strBuilder = new StringBuilder();
    for (int i = 0; i < result.Length; i++)
    {
        //change it into 2 hexadecimal digits
        //for each byte
        strBuilder.Append(result[i].ToString("x2"));
    }

    return strBuilder.ToString();
}
    
asked by anonymous 08.12.2017 / 23:14

1 answer

1

MD5 is a hashing algorithm , not encryption. It is expressly impossible to reverse the Hash action .

Hash is used within an encryption system, more precisely used to encrypt passwords, making them pseudo-random, thus making it impossible to obtain a password through Hash.

By all means, it is not possible to decrypt an MD5.

    
09.12.2017 / 02:29