def AdEchainiv.key

bend-osdev-aead@0.1.0.0 · echainiv.bend:50

import bend-osdev-aead@0.1.0.0/echainiv.bend as Echainiv
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

50# The key from the AEAD's raw key, the IV cipher's raw key and the salt
51def AdEchainiv.key(~KA: Data, ~KC: Data, ~akey: B.Octets -> Result<&2, &2, Cr.CrError, KA>, ~ckey: B.Octets -> Result<&2, &2, Cr.CrError, KC>, ao: B.Octets, co: B.Octets, salt: B.Octets) -> Result<&2, &2, Cr.CrError, AdEchainivKey<KA, KC>>:
52  do Result<&2, &2, Cr.CrError, AdEchainivKey<KA, KC>>:
53    ka : KA <- akey(ao)
54    kc : KC <- ckey(co)
55    return AdEchainivKey{ka, kc, salt}

Uses (6)

Used by (1)