def ccm.checks.tag
import bend-osdev-cipher-modes@0.1.0.0/ccm.bend as Ccmimport Base
import bend-osdev-cipher-modes@0.1.0.0/cipher_modes.bend as M
120def ccm.checks.tag(ok: Bool, +m: Nat, +nl: Nat, +n: Nat) -> Result<&2, &2, M.CmError, Unit>:
121 match ok:
122 case True{}:
123 ccm.checks.nonce(Bool.and(Nat.is_le(7n, nl), Nat.is_le(nl, 13n)), nl, n)
124 case False{}:
125 Fail{M.CmBadTagLength{m}}