HexToString
HexToString(const char *szContent, int len, bool bHasSpace)
{
string str = "";
for (int i=0; i<len; i++)
{
char strTemp[8] = {0};
if (bHasSpace)
{
sprintf(strTemp, "%02X ", (BYTE)szContent[i]);
}
else
{
sprintf(strTemp, "%02X", (BYTE)szContent[i]);
}
str += strTemp;
}
return str;
}
{
string str = "";
for (int i=0; i<len; i++)
{
char strTemp[8] = {0};
if (bHasSpace)
{
sprintf(strTemp, "%02X ", (BYTE)szContent[i]);
}
else
{
sprintf(strTemp, "%02X", (BYTE)szContent[i]);
}
str += strTemp;
}
return str;
}