Commit 1b564f17 authored by Niels Möller's avatar Niels Möller

(print_hex): New function (moved from

yarrow-test.c).

Rev: src/nettle/testsuite/testutils.c:1.10
Rev: src/nettle/testsuite/testutils.h:1.8
Rev: src/nettle/testsuite/yarrow-test.c:1.13
parent 8560129c
......@@ -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
......
......@@ -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);
......
......@@ -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)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment