| 1 |
#include <stdlib.h> |
| 2 |
#include <stdio.h> |
| 3 |
#include "utility.h" |
| 4 |
|
| 5 |
void print_vector(const char* name, const unsigned char* v) |
| 6 |
{ |
| 7 |
int count; |
| 8 |
printf("%s = \n", name); |
| 9 |
for (count = 0; count < 32; count++) |
| 10 |
printf("%02x ", v[count]); |
| 11 |
printf("\n"); |
| 12 |
} |
| 13 |
|
| 14 |
void print_bytes(const char* name, const unsigned char* v, int numbytes) |
| 15 |
{ |
| 16 |
int count; |
| 17 |
printf("%s = \n", name); |
| 18 |
for (count = 0; count < numbytes; count++) |
| 19 |
printf("%02x ", v[count]); |
| 20 |
printf("\n"); |
| 21 |
} |
| 22 |
|
| 23 |
void print_fe(const char* name, const fe in) |
| 24 |
{ |
| 25 |
unsigned char bytes[32]; |
| 26 |
fe_tobytes(bytes, in); |
| 27 |
print_vector(name, bytes); |
| 28 |
} |
| 29 |
|