]> git.cryptolib.org Git - avr-crypto-lib.git/blobdiff - shabea.c
fixed bug in shabea
[avr-crypto-lib.git] / shabea.c
index 49a13215b18de29dfa8827504f46aef574ea257a..52c9461c0ba00152f99cd4762ec7ed845491807b 100644 (file)
--- a/shabea.c
+++ b/shabea.c
 #include "config.h"
 #include "uart.h"
 #include "debug.h"
-/*
- * 
- */
-void memxor(uint8_t * dest, uint8_t * src, uint8_t length){
-       while(length--){
-               *dest++ ^= *src++;
-       }
-} 
+#include "memxor.h"
+
 
 /*
  * SHABEA256-n
@@ -77,7 +71,7 @@ void shabea256(void * block, void * key, uint16_t keysize_b, uint8_t enc, uint8_
                        memcpy(R, hash, HALFSIZEB);
                } else {
                        /* no swap */
-                       memxor(L, hash, HALFSIZE);      
+                       memxor(L, hash, HALFSIZEB);     
                }
        }
 }