void HexStringToBinary(char* szHex, vector<unsigned char> & vBinary)
{
const unsigned int size = sizeof(szHex) / sizeof(szHex[0]) / 2;
vBinary.resize(size);
for (int i = 0; i < size; i++)
{
if (sscanf(szHex + 2 * i, "%2X", &vBinary[i]) != 1)
{
break;
}
}
}
posted on 2010-03-01 17:08
SearchDream 阅读(383)
评论(0) 编辑 收藏 引用