]> git.cryptolib.org Git - avr-crypto-lib.git/blobdiff - test_src/main-hmac-md5-test.c
switching to new main-*-test layout and to stdio streams
[avr-crypto-lib.git] / test_src / main-hmac-md5-test.c
index f61e1191ad28107d0d92a8acfc8c0770bd9b5c93..410592c90f7dc8c9f23ee44fb4e3ce462e1c465b 100644 (file)
  * 
 */
 
-#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 <stdint.h>
-#include <string.h>
-#include "cli.h"
-
 char* algo_name = "HMAC-MD5";
 
 /*****************************************************************************
@@ -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);
        }
 }