+ Reply to Thread
Results 1 to 2 of 2

Thread: MD5 Hash

  1. #1

    MD5 Hash

    I`d like to know how to encrypt and decrypt MD5 , is it possible ?
    Last edited by csharpmaster; 11-09-2012 at 12:35 AM.

  2. #2
    Junior Member
    Join Date
    Jan 2012
    Posts
    22
    But before i get into it , i`d like to mention that MD5 is a one way encryption method , means that
    you can only Encrypt the string and get its encrypted value , but you will never be able to Decrypt it again.
    Okay anyone can go now to google and search "Decrypt MD5" , he will go to a website and website will ask
    him to enter the MD5 Encrypted string and he will enter , but before the result shows up i`d like to mention that
    these websites got a database of text and it`s MD5 value , so sometimes if the text is easy then you will be able
    to get the Decrypted value.

    Okay yeah i spent too much talking , anyway here is the code snippet of MD5 Encrypting :

    Code:
            // THIS is the Method we will be using
            static void  EncodePassword(string originalPassword)
            {
                //Declarations
                Byte[] originalBytes;
                Byte[] encodedBytes;
                MD5 md5;
    
                //Instantiate MD5CryptoServiceProvider, get bytes for original password and compute hash (encoded password)
                md5 = new MD5CryptoServiceProvider();
                originalBytes = ASCIIEncoding.Default.GetBytes(originalPassword);
                encodedBytes = md5.ComputeHash(originalBytes);
    
                //Convert encoded bytes back to a readable string
                Console.WriteLine(BitConverter.ToString(encodedBytes));
            }

+ Reply to Thread

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts