Solved

How to decrypt using MD5Crypto

Posted on 2013-01-29
3
351 Views
Last Modified: 2013-01-30
How can I decrypt a string which uses the folowing code to encrypt a string :

public static string HashResetParams(string username, string guid)
        {
            byte[] bytesofLink = System.Text.Encoding.UTF8.GetBytes(username + guid);
            System.Security.Cryptography.MD5 md5 = new  System.Security.Cryptography.MD5CryptoServiceProvider();
            string HashParams = BitConverter.ToString(md5.ComputeHash(bytesofLink));
            return HashParams;
        }
0
Comment
Question by:brgdotnet
  • 2
3 Comments
 
LVL 19

Expert Comment

by:Rikin Shah
ID: 38833822
Hi,

You want to decrypt MD5 encrypted string which is not possible. MD5 is a non decrypt-able cryptography type.

There are some websites which runs on database for some standard passwords people use to keep (like, 123456, abc123). In that case it can be useful to you to decrypt. In case your password is not simple (like, askjdh122?) the website would not be useful.
0
 
LVL 2

Author Comment

by:brgdotnet
ID: 38833947
When a user registers to my site for the first time, I send them an email message with a unique guid. Then when they click on a link in the email message, they are redirected back to a web page which ask them to confirm their identity. The guid is stored in the query string, where I check it, against it's previously saved value in the database.

So is it senseless for me to encrypt the guid? Guids are fairly cryptic as is? Just thought I would go the extra mile to convulute the password further so no hacker could access it.

What encryption should I use, if encrypting it does make sense?
0
 
LVL 19

Accepted Solution

by:
Rikin Shah earned 200 total points
ID: 38834000
Well, you are on the right track... MD5 is your choice.

Yes Guids are... but for your extra mile you can encrypt it. And when you want to compare the Guids entered by the user while the redirection, the user entered Guid will be encrypted and compared to the encrypted one in the database.

Or you can send the encrypted Guid string right away to the user and ask the user to enter it while confirming the registration. In this case you will not have to encrypt the Guid to compare against the encrypted string in the database.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Media.Imaging 1 18
HttpPostedFile 1 26
Firing an ASP.NET event on selection of a JQuery datepicker 4 20
Problem with SelectList in .NET MVC application 1 17
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question