X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=test_src%2Fmain-hmac-md5-test.c;h=d5d6d3d7e9e6b8491266d57656a4ea3677ebd266;hb=2e0998249aeec3ce8509af80cc56fb6a49f3268d;hp=f61e1191ad28107d0d92a8acfc8c0770bd9b5c93;hpb=d32eba56ce10ea6b9eff123b50d9842673b38f2b;p=avr-crypto-lib.git diff --git a/test_src/main-hmac-md5-test.c b/test_src/main-hmac-md5-test.c index f61e119..d5d6d3d 100644 --- a/test_src/main-hmac-md5-test.c +++ b/test_src/main-hmac-md5-test.c @@ -21,24 +21,13 @@ * */ -#include "config.h" -#include "serial-tools.h" -#include "uart_i.h" -#include "debug.h" +#include "main-test-common.h" #include "md5.h" #include "hmac-md5.h" -/* -#include "base64_enc.h" -#include "base64_dec.h" -*/ #include "nessie_mac_test.h" -#include -#include -#include "cli.h" - -char* algo_name = "HMAC-MD5"; +char *algo_name = "HMAC-MD5"; /***************************************************************************** * additional validation-functions * @@ -98,7 +87,7 @@ void hmacmd5_interactive(void){ cli_hexdump(hmac, HMAC_MD5_BYTES); } -void strhexdump(char* dest, void* src, uint16_t length){ +void strhexdump(char *dest, void *src, uint16_t length){ char table[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', @@ -170,7 +159,7 @@ const char hmd5i_str[] PROGMEM = "hmac-md5"; const char md5i_str[] PROGMEM = "md5"; -cmdlist_entry_t cmdlist[] PROGMEM = { +const cmdlist_entry_t cmdlist[] PROGMEM = { { nessie_str, NULL, testrun_nessie_hmacmd5}, { test_str, NULL, testrun_test_hmacmd5}, { hmd5i_str, NULL, hmacmd5_interactive}, @@ -182,13 +171,10 @@ 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); } }