add hex_encode

This commit is contained in:
2024-03-28 19:09:39 -07:00
parent c795f607ef
commit f60bea0fdd
4 changed files with 40 additions and 5 deletions

View File

@ -345,6 +345,10 @@ void test_crypto() {
assert(s[i] == h2[i]);
}
free(s);
s = hex_encode(h, 4);
assert(strcmp(s, "DEADBEEF") == 0);
free(s);
}
#if defined(__APPLE__) || defined(__MACH__)