X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=test_src%2Fmain-twister-test.c;h=6e23154ed378cb2ce3ef71d83d5c8c9fabfa5ac4;hb=62232d498489a042472dc54876d49fb7cb6ad641;hp=794c05467055541cc63895238a8fc046a77a42b5;hpb=ed07adb6f2aeaf61da0e482cec328120bfeb860e;p=avr-crypto-lib.git diff --git a/test_src/main-twister-test.c b/test_src/main-twister-test.c index 794c054..6e23154 100644 --- a/test_src/main-twister-test.c +++ b/test_src/main-twister-test.c @@ -21,12 +21,11 @@ * */ -#include "config.h" -#include "serial-tools.h" -#include "uart.h" -#include "debug.h" + +#include "main-test-common.h" #include "twister-small.h" +#include "twister-large.h" #include "nessie_hash_test.h" #include "performance_test.h" #include "hfal_twister224.h" @@ -38,15 +37,9 @@ #include "hfal-test.h" #include "shavs.h" - -#include -#include -#include -#include "cli.h" - char* algo_name = "TWISTER"; -const hfdesc_t* algolist[] PROGMEM = { +const hfdesc_t* const algolist[] PROGMEM = { (hfdesc_t*)&twister224_desc, (hfdesc_t*)&twister256_desc, (hfdesc_t*)&twister384_desc, @@ -126,7 +119,7 @@ const char shavs_list_str[] PROGMEM = "shavs_list"; const char shavs_set_str[] PROGMEM = "shavs_set"; const char shavs_test1_str[] PROGMEM = "shavs_test1"; -cmdlist_entry_t cmdlist[] PROGMEM = { +const cmdlist_entry_t cmdlist[] PROGMEM = { { nessie_str, NULL, testrun_nessie_twister}, { test_str, NULL, testrun_twister}, { performance_str, NULL, testrun_performance_twister}, @@ -138,16 +131,13 @@ cmdlist_entry_t cmdlist[] PROGMEM = { }; int main (void){ - DEBUG_INIT(); - - cli_rx = uart_getc; - cli_tx = uart_putc; - shavs_algolist=(hfdesc_t**)algolist; + main_setup(); + + shavs_algolist=(hfdesc_t**)algolist; shavs_algo=(hfdesc_t*)&twister256_desc; + 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); + welcome_msg(algo_name); + cmd_interface(cmdlist); } }