Solved

How to decrypt using MD5Crypto

Posted on 2013-01-29
3
357 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

631 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