;########################################################### \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
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