Click here to Skip to main content
11,802,389 members (29,191 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C# C#4.0
i have the below packet of data:


i want to retrieve the below hashcode (32 digit):

Can you provide me with algorithm to generate the 32 bit string?
Thanks in advance
Posted 25-Jun-13 1:14am
Sergey Alexandrovich Kryukov at 25-Jun-13 7:54am
The question makes no sense. What is "retrieve"? You can generate (calculate) hash code, but there many different algorithms, not one.

But, most importantly: you show a string of the length 33 (characters) and call it "32 bit string". You apparently don't know what you want...

CPallini at 25-Jun-13 8:08am
My 5. You even counted the number of characters.
Sergey Alexandrovich Kryukov at 25-Jun-13 10:36am
Thank you, Carlo.
I counted number of characters after I saw it's odd without counting. Sometimes, I sense asymmetry from the first glance...
Sergey Alexandrovich Kryukov at 25-Jun-13 10:44am
And I finally added a real formal answer, please see.
Not sure if OP will get it... :-)
mradelie at 25-Jun-13 8:37am
you right, can you provide me with the algorithm about how to generate hashcode with 32 bit
Sergey Alexandrovich Kryukov at 25-Jun-13 10:37am
As I say, there are many different algorithms. What, you don't care which one? You should just read some literature on the topic.
mradelie at 26-Jun-13 1:22am
can you provide me with the all algorithm that generate a string with 32 bit?
For correction code must be 128822e1bedbd09eaa210670615f4813
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Please see my comments to the question: there is no one single algorithms.

Also, hash functions are different for different purposes. There are at least two distinct classes of them:[^],[^].

It depends on your purpose, which you did not bother to share with us.

You can learn the algorithms starting from the articles referenced above, but a good number of them are readily available from .NET FCL.

First of all, each and every .NET object of any type has one:[^].

And on the cryptographic side, a number of them are available:[^].

CPallini at 25-Jun-13 11:14am
My 5.
Sergey Alexandrovich Kryukov at 25-Jun-13 16:01pm
Thank you, Carlo.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

for more clarification:
I have the below packet or data :


i want an algorithm to generate the below code or string (which is 32 bit):

i tried several algorithm using md5,sha1,...
but they generate me other code different then the code that i want.
is there any customisation for md5 algorithm or function to get the code that i want?

Any advice please

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

  Print Answers RSS
0 OriginalGriff 475
1 KrunalRohit 366
2 F-ES Sitecore 295
3 Afzaal Ahmad Zeeshan 230
4 CHill60 220
0 OriginalGriff 2,950
1 Maciej Los 1,910
2 KrunalRohit 1,862
3 CPallini 1,645
4 Richard MacCutchan 1,157

Advertise | Privacy | Mobile
Web04 | 2.8.151002.1 | Last Updated 26 Jun 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