     [
         A 5 bitroll-32
 
-        B C D n sha1-f 
+        B C D n sha1-f
 
         E
 
         n K nth-unsafe
 
         n W nth-unsafe
-    ] sum-outputs 32 bits ;
-
-:: process-sha1-chunk ( bytes H W K state -- )
+    ] sum-outputs 32 bits ; inline
+
+:: process-sha1-chunk ( H W K state -- )
     80 [
         H W K inner-loop
         d H nth-unsafe e H set-nth-unsafe

        [ [ 14 - ] dip nth-unsafe bitxor ]
        [ [ 16 - ] dip nth-unsafe bitxor 1 bitroll-32 ]
        [ ]
    } 2cleave set-nth-unsafe ;

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

! Copyright (C) 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays checksums checksums.common
checksums.stream combinators combinators.smart fry grouping
io.binary kernel literals locals math math.bitwise math.ranges
sequences sequences.generalizations sequences.private ;
IN: checksums.sha

SINGLETON: sha1
