diff --git a/testsuite/testutils.c b/testsuite/testutils.c index e18d025c43559ec5b41b908d13f22bb3ad3a9042..8f296b0808151139e8aa59b4656db61f2136a804 100644 --- a/testsuite/testutils.c +++ b/testsuite/testutils.c @@ -108,6 +108,19 @@ decode_hex_dup(const char *hex) } } +void +print_hex(unsigned length, uint8_t *data) +{ + unsigned i; + + for (i = 0; i < length; i++) + { + if (! (i % 8)) + printf(" "); + printf("%02x", data[i]); + } +} + int verbose = 0; int diff --git a/testsuite/testutils.h b/testsuite/testutils.h index 28f66014952f138e90362d3dc387458b5437d0b4..89d2de74484348579de73664449be6f7b7012d99 100644 --- a/testsuite/testutils.h +++ b/testsuite/testutils.h @@ -29,6 +29,9 @@ decode_hex(uint8_t *dst, const char *hex); const uint8_t * decode_hex_dup(const char *hex); +void +print_hex(unsigned length, uint8_t *data); + /* The main program */ int test_main(void); diff --git a/testsuite/yarrow-test.c b/testsuite/yarrow-test.c index 54a176f05ba5f0d733e3a43ccfa831f349345c89..ae97a255ede809f85a34b830d70a64d03c29c05e 100644 --- a/testsuite/yarrow-test.c +++ b/testsuite/yarrow-test.c @@ -36,19 +36,6 @@ get_event(FILE *f, struct sha256_ctx *hash, return 1; } -static void -print_hex(unsigned length, uint8_t *digest) -{ - unsigned i; - - for (i = 0; i < length; i++) - { - if (! (i % 8)) - printf(" "); - printf("%02x", digest[i]); - } -} - static FILE * open_file(const char *name) {