X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=test_src%2Fmain-bmw-test.c;h=18d91a68ff3cc891c79fafeb751335b6f60f4a3e;hb=a45c328791dc391e6432051ee0c7972ef7fd8d9a;hp=1aadbf1aa5a27ffb952639e5b46b8f41696898ae;hpb=e1cb3a050dbdb395e9d87f954d754046481b82f7;p=avr-crypto-lib.git diff --git a/test_src/main-bmw-test.c b/test_src/main-bmw-test.c index 1aadbf1..18d91a6 100644 --- a/test_src/main-bmw-test.c +++ b/test_src/main-bmw-test.c @@ -21,30 +21,24 @@ * */ -#include "config.h" -#include "uart_i.h" -#include "debug.h" +#include "main-test-common.h" #include "bmw_small.h" #include "bmw_large.h" -#include "cli.h" #include "hfal_bmw_small.h" #include "hfal_bmw_large.h" + #include "shavs.h" #include "nessie_hash_test.h" -#include "performance_test.h" #include "hfal-nessie.h" #include "hfal-performance.h" #include "hfal-test.h" - -#include -#include -#include +#include "performance_test.h" char* algo_name = "BlueMidnightWish"; -const hfdesc_t* algolist[] PROGMEM = { +const hfdesc_t* const algolist[] PROGMEM = { (hfdesc_t*)&bmw224_desc, (hfdesc_t*)&bmw256_desc, (hfdesc_t*)&bmw384_desc, @@ -156,38 +150,29 @@ const char shavs_set_str[] PROGMEM = "shavs_set"; const char shavs_test1_str[] PROGMEM = "shavs_test1"; const char shavs_test3_str[] PROGMEM = "shavs_test3"; -cmdlist_entry_t cmdlist[] PROGMEM = { - { nessie_str, NULL, testrun_nessie_bmw}, - { test_str, NULL, testrun_stdtest_bmw}, - { testshort_str, NULL, testshort}, - { testlshort_str, NULL, testlshort}, - { test506_str, NULL, test506}, - { test507_str, NULL, test507}, - { performance_str, NULL, performance_bmw}, - { shavs_list_str, NULL, shavs_listalgos}, - { shavs_set_str, (void*)1, (void_fpt)shavs_setalgo}, - { shavs_test1_str, NULL, shavs_test1}, - { shavs_test3_str, NULL, shavs_test3}, - { echo_str, (void*)1, (void_fpt)echo_ctrl}, - { NULL, NULL, NULL} +const cmdlist_entry_t cmdlist[] PROGMEM = { + { nessie_str, NULL, testrun_nessie_bmw }, + { test_str, NULL, testrun_stdtest_bmw }, + { testshort_str, NULL, testshort }, + { testlshort_str, NULL, testlshort }, + { test506_str, NULL, test506 }, + { test507_str, NULL, test507 }, + { performance_str, NULL, performance_bmw }, + { shavs_list_str, NULL, shavs_listalgos }, + { shavs_set_str, (void*)1, (void_fpt)shavs_setalgo }, + { shavs_test1_str, NULL, shavs_test1 }, + { shavs_test3_str, NULL, shavs_test3 }, + { echo_str, (void*)1, (void_fpt)echo_ctrl }, + { NULL, NULL, NULL } }; int main (void){ - DEBUG_INIT(); + main_setup(); - cli_rx = (cli_rx_fpt)uart0_getc; - cli_tx = (cli_tx_fpt)uart0_putc; - shavs_algolist=(hfdesc_t**)algolist; + shavs_algolist=(hfdesc_t**)algolist; shavs_algo=(hfdesc_t*)&bmw256_desc; for(;;){ - cli_putstr_P(PSTR("\r\n\r\nCrypto-VS (")); - cli_putstr(algo_name); - cli_putstr_P(PSTR("; ")); - cli_putstr(__DATE__); - cli_putstr_P(PSTR(" ")); - cli_putstr(__TIME__); - cli_putstr_P(PSTR(")\r\nloaded and running\r\n")); - + welcome_msg(algo_name); cmd_interface(cmdlist); } }