Created
September 21, 2023 03:42
-
-
Save Cyang39/f9160de4d6e11c86d3ec7df6fc30f2c1 to your computer and use it in GitHub Desktop.
hex print
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void print_hex(const unsigned char *buf, size_t len) { | |
for (size_t i = 0; i < len; i++) { | |
printf("%02x ", buf[i]); | |
} | |
printf("\n"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment