def sip.last
import bend-kit-hash@0.3.0.2/hash.bend as Hashimport Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes
631# The last block: the len % 8 bytes left, and len mod 256 in the top byte.
632def sip.last(+len: U32, r: Array<U32> & W64, s: S4) -> Bytes.Bytes & W64:
633 (a, W64{+hi, +lo}) = r
634 +k = (len .&. 7 : U32)
635 +top = ((len .&. 255) << 24n : U32)
636 (Bytes.Bytes{len, a}, sip.end(sip.block(s, W64{(sip.keep(hi, Bool.pick(U32, U32.is_lt(4, k), (k - 4 : U32), 0)) .|. top : U32), sip.keep(lo, U32.min(k, 4))})))