Click here to Skip to main content
11,714,776 members (77,365 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C# ASP.NET
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 at 20-Feb-13 21:43pm
Who told you it encrypts or decrypts anything?!
thekoko89 at 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 at 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 at 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 at 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
Sergey Alexandrovich Kryukov at 6-Mar-13 18:16pm
Hope we do, I only don't understand what fight do you mean. I see no fight.
Good luck, call again.
thekoko89 at 6-Mar-13 18:23pm
Ok my mistake miss understanding...
Sergey Alexandrovich Kryukov at 6-Mar-13 18:23pm
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
0 Sergey Alexandrovich Kryukov 550
1 Richard MacCutchan 275
2 Maciej Los 274
3 ManasKumarM 155
4 CHill60 135
0 Sergey Alexandrovich Kryukov 545
1 CHill60 375
2 Maciej Los 324
3 Richard MacCutchan 310
4 OriginalGriff 260

Advertise | Privacy | Mobile
Web04 | 2.8.150819.1 | Last Updated 20 Feb 2013
Copyright © CodeProject, 1999-2015
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