Skip to content
Snippets Groups Projects
Commit 1b564f17 authored by Niels Möller's avatar Niels Möller
Browse files

(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
Branches
Tags
No related merge requests found
......@@ -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)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment