Click here to Skip to main content
15,888,283 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all

I am working on a task and I am in a jam, I have learned fairly a lot about the nature of MD5 encryption (or hash encryption, there are a ton of terms). I also know that there is a namespace called -Cryptography that I can use while coding in C# to encrypt strings in the MD5 hash encryption. However I have to match existing data. The catch being that I am out by a few 0’s... eg. 123 = 202cb962ac59075b964b07152d234b70 on a site that I use to encrypt/decrypt passwords for testing the program, however using the cryptography class I will get the following : 202cb962ac5975b964b7152d234b70 out by two 0’s. (used text compare for this)
I have done everything I can think of to see why this is happening, the 0’ are not unique in any ways, it seems to be a different form of MD5 encryption or something. I guess I am asking for help, in any form really, information, suggestions, maybe even a question I should be asking myself.

I know MD5 is not something for a newbie like me, however at the current moment I am both fascinated by it, but frustrated and am running out of ideas. Any form of help will be greatly appreciated.
Thank you in advance
Posted
Comments
[no name] 2-Jul-14 8:26am    
The main question that you should be asking yourself is, "How does my posting fit into the Quick Answers section of this website when I am really looking to have a discussion about MD5 which is not encryption but a hashing algorithm".
Star_Rookie 2-Jul-14 9:29am    
I suppose that this question was just me asking for help, is it wrong to post it here where someone might be able to refer me to a site or give me insight that will assist me in solving my problem? I fail to see this as a discussion when it is an issue I am having.
[no name] 2-Jul-14 10:47am    
What "issue" is it that you are referring to? All I see here is someone that does not know what MD5 is asking for "information, suggestions, maybe even a question I should be asking myself." which is a disccussion.
Star_Rookie 3-Jul-14 0:42am    
Clearly you do not agree that this is/was a question, however, someone was kind enough to understand what I was having trouble with and helped me solve my problem, as you can see by the fact that it has been solved. I am sorry that you feel I am trying to start a discussion by asking for help on a public site for developers who need help or assistance.

1 solution

Please check your code. I copied the example in this MSDN page: "MD5 Class"[^], changed the input string from "Hello World!" to "123" and eventually got the correct result.
 
Share this answer
 
Comments
Star_Rookie 2-Jul-14 9:37am    
CPallini thank you so much. I guess I was over-complicating things! This worked as far as I have tested it. Thank you kindly, I sincerely appreciate the help.
CPallini 2-Jul-14 11:15am    
You are welcome.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900