Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char *byte2hex(char *s, unsigned char byte) {
- static char hex[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
- *s++ = hex[ (byte >> 4) & 0x0F ];
- *s++ = hex[ byte & 0x0F ];
- *s++='\0';
- return s;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement