             [ T2 ]
             [ update-H ] tri 
         ] with each
-    ] keep H get [ w+ ] 2map H set ;
+    ] keep sha2 get H>> [ w+ ] 2map sha2 get (>>H) ;
 
 : pad-initial-bytes ( string -- padded-string )
     dup [


<PRIVATE

SYMBOLS: H word-size block-size ;

CONSTANT: a 0
CONSTANT: b 1


: byte-array>sha2 ( byte-array -- string )
    pad-initial-bytes
    sha2 get block-size>> <sliced-groups>
    [
        prepare-message-schedule
        sha2 get [ block-size>> ] [ H>> clone ] bi process-chunk
    ] each
    sha2 get H>> 4 seq>byte-array ;

PRIVATE>

