Blog Stats
  • Posts - 45
  • Articles - 0
  • Comments - 23
  • Trackbacks - 20

 

February 2006 Entries

blog story

Here is an interesting post this morning from the New York Metro. IT talks about why people blog and how some blogs are more popular than others (like me :( ) Have Fun

byte array to hex string in C++

Here is a way to convert your byte array to a hex string in c++. It will convert a byte array that looks like 2A 1F 2C to a string value "2A1F2C" char finalhash[20]; char hexval[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'}; for(int j = 0; j finalhash[j*2] = hexval[((hval[j] >> 4) & 0xF)]; finalhash[(j*2) + 1] = hexval[(hval[j]) & 0x0F]; }

 

 

Copyright © Rishi Pande