 
 : prepare-M-256 ( n seq -- )
     {
-        [ [ 16 - ] dip nth ]
-        [ [ 15 - ] dip nth s0-256 ]
-        [ [ 7 - ] dip nth ]
-        [ [ 2 - ] dip nth s1-256 w+ w+ w+ ]
+        [ [ 16 - ] dip nth-unsafe ]
+        [ [ 15 - ] dip nth-unsafe s0-256 ]
+        [ [ 7 - ] dip nth-unsafe ]
+        [ [ 2 - ] dip nth-unsafe s1-256 w+ w+ w+ ]
         [ ]
-    } 2cleave set-nth ; inline
+    } 2cleave set-nth-unsafe ; inline
 
 : prepare-M-512 ( n seq -- )
     {
-        [ [ 16 - ] dip nth ]
-        [ [ 15 - ] dip nth s0-512 ]
-        [ [ 7 - ] dip nth ]
-        [ [ 2 - ] dip nth s1-512 w+ w+ w+ ]
+        [ [ 16 - ] dip nth-unsafe ]
+        [ [ 15 - ] dip nth-unsafe s0-512 ]
+        [ [ 7 - ] dip nth-unsafe ]
+        [ [ 2 - ] dip nth-unsafe s1-512 w+ w+ w+ ]
         [ ]
-    } 2cleave set-nth ; inline
+    } 2cleave set-nth-unsafe ; inline
 
 : ch ( x y z -- x' )
     [ bitxor bitand ] keep bitxor ; inline

    drop
    [ <sha-256-state> ] dip add-checksum-stream get-checksum ;



: sha1-W ( t seq -- )
    {
        [ [ 3 - ] dip nth ]
        [ [ 8 - ] dip nth bitxor ]
        [ [ 14 - ] dip nth bitxor ]
        [ [ 16 - ] dip nth bitxor 1 bitroll-32 ]
        [ ]
    } 2cleave set-nth ;

: prepare-sha1-message-schedule ( seq -- w-seq )
    4 <sliced-groups> [ be> ] map

    } case ;

:: inner-loop ( n H W K -- temp )
    a H nth-unsafe :> A
    b H nth-unsafe :> B
    c H nth-unsafe :> C
    d H nth-unsafe :> D
    e H nth-unsafe :> E
    [
        A 5 bitroll-32

