def cr.cts.b.go

bend-osdev-crypto@0.1.0.0 · cts.bend:25

import bend-osdev-crypto@0.1.0.0/cts.bend as Cts
import Base
import bend-osdev-bytes@0.1.0.0/bytes.bend as B

25# a block of bytes encrypted or decrypted (f is the cipher's enc or dec)
26def cr.cts.b.go(~K: Data, ~Blk: Data, ~f: K -> Blk -> Blk, ~blk_to: Blk -> B.Octets, +k: K, x: Maybe<&2, Blk>, +o: B.Octets) -> B.Octets:
27  match x:
28    case None{}:
29      o
30    case Some{b}:
31      blk_to(f(k, b))

Uses (2)

Used by (1)