law cast6_key_length

bend-osdev-crypto@0.1.0.0 · LAWS.bend:937

import bend-osdev-crypto@0.1.0.0/LAWS.bend as LAWS
import Base
import bend-osdev-bytes@0.1.0.0/bytes.bend as B
import bend-osdev-legacy-ciphers@0.1.0.0/cast6.bend as C6
import bend-osdev-crypto@0.1.0.0/crypto.bend as Cr
import bend-osdev-crypto@0.1.0.0/inst_lc.bend as LC

937# CAST-256 (legacy-ciphers): a key of 18 bytes is refused
938law cast6_key_length:
939  {Result.map(&2, &2, Cr.CrError, C6.LcCast6Key, Unit, k => Unit{}, LC.CrLc.key(~C6.LcCast6Key, ~C6.LcCast6.key, B.Octets.zeros(18n))) == Fail{Cr.CrBadKeyLength{18n}} : Result<&2, &2, Cr.CrError, Unit>}

Uses (8)

Used by (0)

No other definition uses this definition.