def fin0

mylsm-lsm-store@0.6.0.1 · src/hub_sha/core.bend:811

import mylsm-lsm-store@0.6.0.1/src/hub_sha/core.bend as Core
import Base
import mylsm-lsm-store@0.6.0.1/src/hub_sha/state.bend as S

811# Final block(s) for an n-byte message ending in r = 0..63 tail bytes. Each
812# tail length has its own padded layout: the tail bytes, the 0x80 marker, the
813# zero fill and the big-endian bit length are packed straight into schedule
814# words, so no padded list is built.
815def fin0(+byte_length: Nat, +extra: Nat, state: S.State) -> S.State:
816  fips_compress16(pack(128, 0, 0, 0), pack(0, 0, 0, 0), pack(0, 0, 0, 0), pack(0, 0, 0, 0), pack(0, 0, 0, 0), pack(0, 0, 0, 0), pack(0, 0, 0, 0), pack(0, 0, 0, 0), pack(0, 0, 0, 0), pack(0, 0, 0, 0), pack(0, 0, 0, 0), pack(0, 0, 0, 0), pack(0, 0, 0, 0), pack(0, 0, 0, 0), len_hi(byte_length), len_lo(byte_length),
817    extra, state)

Uses (6)

Used by (1)