def fin0

bend-collections-laws-crypto@1.0.0.0 · src/crypto/sha/core.bend:691

import bend-collections-laws-crypto@1.0.0.0/src/crypto/sha/core.bend as Core
import Base
import bend-collections-laws-crypto@1.0.0.0/src/crypto/sha/state.bend as S

691# Final block(s) for an n-byte message ending in r = 0..63 tail bytes. Each
692# tail length has its own padded layout: the tail bytes, the 0x80 marker, the
693# zero fill and the big-endian bit length are packed straight into schedule
694# words, so no padded list is built.
695def fin0(+n: Nat, +extra: Nat, s: S.State) -> S.State:
696  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(n), len_lo(n),
697    extra, s)

Uses (6)

Used by (1)