]> git.cryptolib.org Git - avr-crypto-lib.git/blobdiff - sha256-asm.S
added sha1 in C and AVR-ASM
[avr-crypto-lib.git] / sha256-asm.S
index 0769e7cd28e5a8e41d2c0f6356ed6c1c1cc2f0be..0629b2dcc60613d54b6772e92c85fb42578c1314 100644 (file)
@@ -96,8 +96,8 @@ SREG = 0x3F
 ;###########################################################   \r
 \r
 .global sha256_ctx2hash\r
-; === sha256_lastBlock ===\r
-; this function does padding & Co. for calculating SHA-256 hashes\r
+; === sha256_ctx2hash ===\r
+; this function converts a state into a normal hash (bytestring)\r
 ;  param1: the 16-bit destination pointer\r
 ;      given in r25,r24 (r25 is most significant)\r
 ;  param2: the 16-bit pointer to sha256_ctx structure\r
@@ -840,13 +840,13 @@ update_state_loop:
        add r20, r21\r
        st Z+, r20      \r
        clr r21\r
-sha256_nexBlock_fix_length:    \r
+sha256_nextBlock_fix_length:   \r
        brcc sha256_nextBlock_epilog\r
        ld r20, Z\r
        adc r20, r21\r
        st Z+, r20\r
        dec r22\r
-       brne sha256_nexBlock_fix_length\r
+       brne sha256_nextBlock_fix_length\r
        \r
 ; EPILOG\r
 sha256_nextBlock_epilog:\r