]> git.cryptolib.org Git - avr-crypto-lib.git/blobdiff - test_src/main-omac-noekeon-test.c
backporting uart_i and cli
[avr-crypto-lib.git] / test_src / main-omac-noekeon-test.c
index 377a921f1199419e4ca450387196e16623c7341e..3df0d2e754cfc5aa26740d6e627a24b0ab9a4977 100644 (file)
@@ -23,7 +23,7 @@
 
 #include "config.h"
 #include "serial-tools.h"
-#include "uart.h"
+#include "uart_i.h"
 #include "debug.h"
 
 #include "noekeon.h"
@@ -72,22 +72,22 @@ void testrun_test_omac_noekeon(void){
 
 uint8_t stat_key[16];
 
-void omac_noekeon_next_dummy(void* buffer, void* ctx){
+void omac_noekeon_next_dummy(void* ctx, const void* buffer){
        omac_noekeon_next(buffer, stat_key, ctx);
 }
 
-void omac_noekeon_init_dummy(void* key, uint16_t keysize_b, void* ctx){
+void omac_noekeon_init_dummy(void* ctx, const void* key, uint16_t keysize_b){
        omac_noekeon_init(ctx);
        memcpy(stat_key, key, 16);
 }
 
-void omac_noekeon_last_dummy(void* buffer, uint16_t size_b, void* key, uint16_t keysize_b, void* ctx){
+void omac_noekeon_last_dummy(void* ctx, const void* buffer, uint16_t size_b){
        while(size_b>128){
-               omac_noekeon_next(buffer, key, ctx);
+               omac_noekeon_next(buffer, stat_key, ctx);
                size_b -= 128;
                buffer = (uint8_t*)buffer +16;
        }
-       omac_noekeon_last(buffer, size_b, key, ctx);
+       omac_noekeon_last(buffer, size_b, stat_key, ctx);
 }
 
 void omac_noekeon_conv_dummy(void* buffer, void* ctx){
@@ -168,8 +168,8 @@ cmdlist_entry_t cmdlist[] PROGMEM = {
 int main (void){
        DEBUG_INIT();
        
-       cli_rx = uart_getc;
-       cli_tx = uart_putc;             
+       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);