X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=test_src%2Fmain-sha1-test.c;h=26bee126bdf9649277b4d3cb807cc95abbf5ee14;hb=d9352fc79fbdee0cf3288809b104ea196ea85693;hp=44e8225c2cba310ad1043c13cc3abba12da5b11c;hpb=44bd9d38e15d4b03486f4cf52dd9bbf2f97e6e17;p=avr-crypto-lib.git diff --git a/test_src/main-sha1-test.c b/test_src/main-sha1-test.c index 44e8225..26bee12 100644 --- a/test_src/main-sha1-test.c +++ b/test_src/main-sha1-test.c @@ -1,7 +1,7 @@ /* main-sha1-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,27 +21,21 @@ * */ -#include "config.h" -#include "uart_i.h" -#include "debug.h" +#include "main-test-common.h" #include "sha1.h" #include "nessie_hash_test.h" #include "hfal_sha1.h" #include "hfal-performance.h" -#include -#include -#include -#include "cli.h" #include "shavs.h" #include "hfal_sha1.h" #include "dump.h" -char* algo_name = "SHA-1"; +char *algo_name = "SHA-1"; -const hfdesc_t* const algolist[] PROGMEM = { +const hfdesc_t *const algolist[] PROGMEM = { (hfdesc_t*)&sha1_desc, NULL }; @@ -210,16 +204,12 @@ const cmdlist_entry_t cmdlist[] PROGMEM = { }; 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*)&sha1_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); } }