Click here to Skip to main content
13,150,178 members (29,719 online)
Rate this:
Please Sign up or sign in to vote.
See more:
i am new in this encoding decoding stufs and i have some problem.
I work on VS 2012 ASP.NET c#.
My problem is that i need to create CheckSum value from some input string. The length of the CheckSum need to be 16 bytes (32 characters) long like this one: "8A303F3E0CB4F8A9CDA5AC120F9B90A4".
The encryption need to be done using a pass key for example TEST_PASS and this key will be used latter to be decrypted this hash value....
hope you understand what i ask and what i need pls help me
Posted 20-Feb-13 15:35pm
Sergey Alexandrovich Kryukov 20-Feb-13 21:43pm
Who told you it encrypts or decrypts anything?!
thekoko89 20-Feb-13 21:54pm
i gess mabey they will not decrypt but will use the same TEST_PASS to compare those posted values...

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

No! MD5 is cryptography thing, but its not for encryption or decryption. This is a cryptographic hash function:[^].

And as such, it is not good; it's strongly recommended not to use it for any cryptographic purposes: it's broken. Please see:[^].

That's it. But check sum can be used for non-cryptographic purposes, but just as a check. This is what you probably need. So, everything you need is provided in .NET FCL:[^].

thekoko89 20-Feb-13 21:50pm
my merchant service ask me to do this and generate a checksum usind MD5 with TEST_PASS :S so i realy need some code to do this its the only way
Sergey Alexandrovich Kryukov 20-Feb-13 21:58pm
Who cares who asked you and why? I'm talking to you, not with "merchant service", because you asked us a question, not they. Don't you see that I answered?! What else is a problem? You have all you need.
If you can see it, please accept the answer formally (green button), if not — your follow-up questions are welcome.
thekoko89 20-Feb-13 22:03pm
gess we understand each other i was trying to explain what exactly is my problem.... there is no need for fight... tnx for understanding i am in a bug pressure at the mom
Hope we do, I only don't understand what fight do you mean. I see no fight.
Good luck, call again.
thekoko89 6-Mar-13 18:23pm
Ok my mistake miss understanding...
Great. Good luck.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.170924.2 | Last Updated 20 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100