From 5a83cf2b010b74721dec56d940dcf457fae24205 Mon Sep 17 00:00:00 2001 From: bg Date: Sun, 20 Jan 2013 22:57:05 +0100 Subject: [PATCH] [sha1-asm] fixing bug when *_lastBlock is used to hash multiple blocks, thanks to Alex --- sha1/sha1-asm.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sha1/sha1-asm.S b/sha1/sha1-asm.S index 4d185f9..f479fcc 100644 --- a/sha1/sha1-asm.S +++ b/sha1/sha1-asm.S @@ -284,8 +284,8 @@ sha1_lastBlock: pop r25 subi r21, 2 ldi r19, 64 - sub r22, r19 - sbc r23, r1 + add r22, r19 + adc r23, r1 rjmp sha1_lastBlock sha1_lastBlock_prolog: /* allocate space on stack */ -- 2.39.2