def cr.kex.with
bend-osdev-crypto@0.1.0.0 · kex.bend:31
import bend-osdev-crypto@0.1.0.0/kex.bend as Kex
import Base
import bend-osdev-bytes@0.1.0.0/bytes.bend as B
import bend-osdev-crypto@0.1.0.0/crypto.bend as Cr
31def cr.kex.with(~SK: Data, ~PK: Data, ~shared: SK -> PK -> Result<&2, &2, Cr.CrError, B.Octets>, sk: Result<&2, &2, Cr.CrError, SK>, pk: Result<&2, &2, Cr.CrError, PK>) -> Result<&2, &2, Cr.CrError, B.Octets>:
32 match sk pk:
33 case Fail{e} _:
34 Fail{e}
35 case Done{a} Fail{e}:
36 Fail{e}
37 case Done{a} Done{p}:
38 shared(a, p)