X-Git-Url: https://git.cryptolib.org/?p=avr-crypto-lib.git;a=blobdiff_plain;f=test_src%2Fmain-threefish-test.c;h=af8544655f3ebea561f0d9221303d19f896ddada;hp=45ecd0097430e2df31da1f3caeb413ad5403d5cf;hb=4b5da1dc27a791b5c448274a3db09cd035b33493;hpb=701cee0d98aab48dd3192c8cc7c77eb42581bc56 diff --git a/test_src/main-threefish-test.c b/test_src/main-threefish-test.c index 45ecd00..af85446 100644 --- a/test_src/main-threefish-test.c +++ b/test_src/main-threefish-test.c @@ -1,7 +1,7 @@ /* main-threefish-test.c */ /* 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 @@ -21,13 +21,10 @@ * */ -#include "config.h" -#include "uart_i.h" -#include "debug.h" +#include "main-test-common.h" #include "threefish.h" -#include "cli.h" #include "performance_test.h" #include "bcal-performance.h" #include "bcal-nessie.h" @@ -35,13 +32,9 @@ #include "bcal_threefish512.h" #include "bcal_threefish1024.h" -#include -#include -#include +char *algo_name = "Threefish"; -char* algo_name = "Threefish"; - -const bcdesc_t* const algolist[] PROGMEM = { +const bcdesc_t *const algolist[] PROGMEM = { (bcdesc_t*)&threefish256_desc, (bcdesc_t*)&threefish512_desc, (bcdesc_t*)&threefish1024_desc, @@ -51,7 +44,7 @@ const bcdesc_t* const algolist[] PROGMEM = { * additional validation-functions * *****************************************************************************/ -void threefish256_dump(threefish256_ctx_t* ctx){ +void threefish256_dump(threefish256_ctx_t *ctx){ uint8_t i; cli_putstr_P(PSTR("\r\n=== ctx dump (256) === \r\n k: ")); for(i=0; i<5; ++i){ @@ -267,14 +260,10 @@ const cmdlist_entry_t cmdlist[] PROGMEM = { }; int main (void){ - DEBUG_INIT(); - - cli_rx = (cli_rx_fpt)uart0_getc; - cli_tx = (cli_tx_fpt)uart0_putc; - for(;;){ - cli_putstr_P(PSTR("\r\n\r\nCrypto-VS (")); - cli_putstr(algo_name); - cli_putstr_P(PSTR(")\r\nloaded and running\r\n")); - cmd_interface(cmdlist); + main_setup(); + + for(;;){ + welcome_msg(algo_name); + cmd_interface(cmdlist); } }