]> git.cryptolib.org Git - avr-crypto-lib.git/blobdiff - test_src/main-twister-test.c
switching to new main-*-test layout and to stdio streams
[avr-crypto-lib.git] / test_src / main-twister-test.c
index 794c05467055541cc63895238a8fc046a77a42b5..6e23154ed378cb2ce3ef71d83d5c8c9fabfa5ac4 100644 (file)
  * 
 */
 
-#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"
 #include "hfal-test.h"
 #include "shavs.h"
 
-
-#include <stdint.h>
-#include <string.h>
-#include <stdlib.h>
-#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);
        }
 }