|
 |
|
 |
03-14-2006, 12:48 AM
|
#1 (permalink)
|
|
Registered User
Join Date: Mar 2006
Posts: 7
|
Decrypt MD5
Can you Decrypt MD5 in c#. It's a difficult problem. Plz help me
|
|
|
03-14-2006, 04:43 AM
|
#2 (permalink)
|
|
Senior Contributor
Join Date: Mar 2005
Posts: 651
|
Why and what you need to decrypt ?
|
|
|
03-14-2006, 02:20 PM
|
#3 (permalink)
|
|
Jack of all trades
Join Date: Feb 2005
Location: Los Angeles
Posts: 596
|
in general no. yoou just take something you think is equivalent, generate the MD5 hash of that, and compare that with your original MD5. If they match you know what was encrypted.
__________________
Stop intellectual property from infringing on me
|
|
|
03-14-2006, 02:32 PM
|
#4 (permalink)
|
|
Moderator
Join Date: May 2002
Location: us.ca
Posts: 4,444
|
I like DJM's question  I am curious.
|
|
|
03-14-2006, 03:41 PM
|
#5 (permalink)
|
|
Registered User
Join Date: Mar 2006
Posts: 7
|
Example I encrypt by:
Quote:
private string encryptString(string strToEncrypt)
{
System.Text.UTF8Encoding ue = new System.Text.UTF8Encoding();
byte[] bytes = ue.GetBytes(strToEncrypt);
// encrypt bytes
System.Security.Cryptography.MD5CryptoServiceProvi der md5 = new System.Security.Cryptography.MD5CryptoServiceProvi der();
byte[] hashBytes = md5.ComputeHash(bytes);
// Convert the encrypted bytes back to a string (base 16)
string hashString = "";
for(int i=0;i<hashBytes.Length;i++)
{
hashString += Convert.ToString(hashBytes[i],16).PadLeft(2,'0');
}
return hashString.PadLeft(32,'0');
}
|
Now i want decrypt the password, but i can't write the best code. Please help me.
|
|
|
03-14-2006, 03:52 PM
|
#6 (permalink)
|
|
Jack of all trades
Join Date: Feb 2005
Location: Los Angeles
Posts: 596
|
Just store the encrypted password, and when you ask the user again for the password, encrypt it with the same process. If the encrypted strings match, they entered the same password.
__________________
Stop intellectual property from infringing on me
|
|
|
03-14-2006, 04:08 PM
|
#7 (permalink)
|
|
Registered User
Join Date: Mar 2006
Posts: 7
|
Have other way ? The way of teknomage1 same banana
|
|
|
03-14-2006, 04:15 PM
|
#8 (permalink)
|
|
Senior Contributor
Join Date: Mar 2005
Posts: 651
|
Quote:
|
Originally Posted by sde
I like DJM's question  I am curious.
|
hehehe same frequencies
As tekno said: encrypt again
|
|
|
03-14-2006, 06:16 PM
|
#9 (permalink)
|
|
Jack of all trades
Join Date: Feb 2005
Location: Los Angeles
Posts: 596
|
same banana?
__________________
Stop intellectual property from infringing on me
|
|
|
03-14-2006, 08:25 PM
|
#10 (permalink)
|
|
Moderator
Join Date: May 2002
Location: us.ca
Posts: 4,444
|
lol, banana
khanhlq: you can not decrypt md5. it is one-way encryption.
|
|
|
03-16-2006, 12:09 AM
|
#11 (permalink)
|
|
Registered User
Join Date: Mar 2006
Posts: 7
|
Quote:
|
Just store the encrypted password, and when you ask the user again for the password, encrypt it with the same process. If the encrypted strings match, they entered the same password.
|
Send me the code and i'll try it and i found the lost pass. The pass use in database, i can see it(encrypted) but i don't remember the actual of pass.
|
|
|
03-16-2006, 12:18 AM
|
#12 (permalink)
|
|
Moderator
Join Date: May 2002
Location: us.ca
Posts: 4,444
|
if you have access to the database, why don't you just md5 a new pass, and paste the encrypted string in the database so you know what your pass is.
|
|
|
03-16-2006, 12:27 AM
|
#13 (permalink)
|
|
Registered User
Join Date: Mar 2006
Posts: 7
|
But i want write a programme descrypt. Somebody written, plz send me. Thanks
|
|
|
03-16-2006, 04:07 AM
|
#14 (permalink)
|
|
Senior Contributor
Join Date: Mar 2005
Posts: 651
|
time to lock this thread?
|
|
|
03-16-2006, 06:29 AM
|
#15 (permalink)
|
|
Newbie
Join Date: Jun 2002
Location: Denmark
Posts: 1,692
|
Done and done, since theres no way to decipher something that is a one way encryption, plus, the only place I could see use for something like that, would be in a direction towards password cracking, which we don't approve of here at Code Newbie.
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -8. The time now is 07:42 PM.
|
Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting
|
 |
|