Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#4.0
hi
i have the below packet of data:
 
data=kabam_id=57908157&naid=57907818&access_token=92fa8b0d-1cd2-4e0d-82e5-f828e98891f2&mobileid=842a5358cb5c4a8dc6c0e07e5a2ce192&platformid=203&become_user_id=&become_password=&debug=0&gver=13.0.0&gameSlot=8&gameNumber=1365345604&gameKey=
 
i want to retrieve the below hashcode (32 digit):
128822e1bedbd09eaa210670615f48134
 
Can you provide me with algorithm to generate the 32 bit string?
Thanks in advance
Posted 25-Jun-13 2:14am
Comments
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...
 
—SA
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...
—SA
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... :-)
—SA
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.
—SA
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
good
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:
http://en.wikipedia.org/wiki/Hash_function[^],
http://en.wikipedia.org/wiki/Cryptographic_hash_function[^].
 
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: http://msdn.microsoft.com/en-us/library/system.object.gethashcode.aspx[^].
 
And on the cryptographic side, a number of them are available: http://msdn.microsoft.com/en-us/library/system.security.cryptography.hashalgorithm.aspx[^].
 
—SA
  Permalink  
v2
Comments
CPallini at 25-Jun-13 11:14am
   
My 5.
Sergey Alexandrovich Kryukov at 25-Jun-13 16:01pm
   
Thank you, Carlo.
—SA
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

for more clarification:
I have the below packet or data :
 
data=kabam_id=57908157&naid=57907818&access_token=92fa8b0d-1cd2-4e0d-82e5-f828e98891f2&mobileid=842a5358cb5c4a8dc6c0e07e5a2ce192&platformid=203&become_user_id=&become_password=&debug=0&gver=13.0.0&gameSlot=8&gameNumber=1365345604&gameKey=
 
i want an algorithm to generate the below code or string (which is 32 bit):
128822e1bedbd09eaa210670615f4813
 
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
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 490
1 Maciej Los 305
2 Richard MacCutchan 270
3 Mathew Soji 220
4 BillWoodruff 210
0 OriginalGriff 8,834
1 Sergey Alexandrovich Kryukov 7,477
2 DamithSL 5,689
3 Maciej Los 5,329
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web02 | 2.8.1411028.1 | Last Updated 26 Jun 2013
Copyright © CodeProject, 1999-2014
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