]> git.cryptolib.org Git - avr-crypto-lib.git/blobdiff - twister-big.c
small bug in twister (C) fixed asm version needs fixing
[avr-crypto-lib.git] / twister-big.c
index cc0c1215ef72542442b02ec5443655ab851c096b..1c0c56f2421f71877c046bea4c75315670c93f12 100644 (file)
@@ -1,6 +1,6 @@
 /* twister-big.c */
 /*
-    This file is part of the Crypto-avr-lib/microcrypt-lib.
+    This file is part of the AVR-Crypto-Lib.
     Copyright (C) 2008  Daniel Otte (daniel.otte@rub.de)
 
     This program is free software: you can redistribute it and/or modify
@@ -117,7 +117,7 @@ void twister_inject_chksum(twister_big_ctx_t* ctx, uint8_t col){
 
 void twister_big_lastBlock(twister_big_ctx_t* ctx, const void* msg, uint16_t length_b){
        uint8_t tmp[64];        
-       while(length_b>512){
+       while(length_b>=512){
                twister_big_nextBlock(ctx, msg);
                msg = ((uint8_t*)msg)+64;
                length_b -= 512;