X-Git-Url: https://git.cryptolib.org/?p=avr-crypto-lib.git;a=blobdiff_plain;f=test_src%2Fnessie_common.h;h=e8de421ecfc807b98e00e3df2da53f319b91b55d;hp=0d1754b96c9ce36d0d6592c3d85564a8022b91e5;hb=4b5da1dc27a791b5c448274a3db09cd035b33493;hpb=572b35bb7409fb362441e0812cb62eab9f2411f0 diff --git a/test_src/nessie_common.h b/test_src/nessie_common.h index 0d1754b..e8de421 100644 --- a/test_src/nessie_common.h +++ b/test_src/nessie_common.h @@ -1,7 +1,7 @@ /* nessie_common.h */ /* This file is part of the AVR-Crypto-Lib. - Copyright (C) 2008 Daniel Otte (daniel.otte@rub.de) + Copyright (C) 2006-2015 Daniel Otte (bg@nerilex.org) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,7 +19,7 @@ /** * * author: Daniel Otte - * email: daniel.otte@rub.de + * email: bg@nerilex.org * license: GPLv3 * * common function for nessie-tests @@ -29,14 +29,41 @@ #ifndef NESSIE_COMMON_H_ #define NESSIE_COMMON_H_ +#define NESSIE_ALIVE_CHAR 0x06 +#define NESSIE_ALIVE +#define NESSIE_USE_CLI #include +#include -void nessie_print_block(uint8_t* block, uint16_t blocksize_bit); -void nessie_print_item(char* name, uint8_t* buffer, uint16_t size_B); +#ifdef NESSIE_ALIVE +#define NESSIE_SEND_ALIVE nessie_send_alive() +void nessie_send_alive(void); +#define NESSIE_SEND_ALIVE_A(i) nessie_send_alive_a(i) +void nessie_send_alive_a(uint16_t i); +#else +#define NESSIE_SEND_ALIVE +#define NESSIE_SEND_ALIVE_A(i) +#endif + +/* +#ifdef NESSIE_USE_CLI +#include "cli.h" +#define NESSIE_PUTC cli_putc +#define NESSIE_PUTSTR cli_putstr +#define NESSIE_PUTSTR_P cli_putstr_P +#else +# error "direct uart output removed for nessie" +#endif +*/ + +void nessie_set_output_stream(FILE *out_stream); + +void nessie_print_block(uint8_t *block, uint16_t blocksize_bit); +void nessie_print_item(const char *name, uint8_t *buffer, uint16_t size_B); void nessie_print_set_vector(uint8_t set, uint16_t vector); void nessie_print_setheader(uint8_t set); -void nessie_print_header(char* name, +void nessie_print_header(const char *name, uint16_t keysize_b, uint16_t blocksize_b, uint16_t hashsize_b,