Browse Source Download (without any required ccan dependencies)
str/hex
hex-to-string conversions and vice-versa
Rusty Russell <[email protected]>
This code contains simple routines for hexadecimal strings.
int main(int argc, char *argv[])
{
int i;
for (i = 1; i < argc; i++) {
char str[hex_str_size(strlen(argv[i]))];
hex_encode(str, sizeof(str), argv[i], strlen(argv[i]));
printf("%s ", str);
}
printf("\n");
return 0;
}
CC0 (Public domain)