Skip to content

Instantly share code, notes, and snippets.

@Cyang39
Created September 21, 2023 03:42
Show Gist options
  • Save Cyang39/f9160de4d6e11c86d3ec7df6fc30f2c1 to your computer and use it in GitHub Desktop.
Save Cyang39/f9160de4d6e11c86d3ec7df6fc30f2c1 to your computer and use it in GitHub Desktop.
hex print
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