Solved

How to decrypt using MD5Crypto

Posted on 2013-01-29
3
347 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Bit flags and bit flag manipulation is perhaps one of the most underrated strategies in programming, likely because most programmers developing in high-level languages rely too much on the high-level features, and forget about the low-level ones. Th…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

762 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now