void ByteToHexStr(char* str, char* dest, int len)
{
byte tmp;
char stb[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
for (size_t i = 0; i < len; i++)
{
tmp = dest[i];
str[i * 2] = stb[tmp >> 4];
str[i * 2 + 1] = stb[tmp & 15];
}
return;
}
c ByteToHexStr
最新推荐文章于 2021-08-06 08:58:16 发布