the inner MIME entity
the pkijs certificate
the SMIME_KEM row
the certificate's key oid
{ cipherText, sharedSecret, cek?, iv? }
'aes256-gcm' (the default: AuthEnvelopedData)
or 'aes256-cbc' (EnvelopedData version 3), as
smimeContentEncryption() reads it
the ContentInfo DER
Builds the KEM envelope from a shared secret that is already in hand. Production obtains that secret from encapsulate. A test passes a fixed one, because a runtime without ML-KEM cannot encapsulate and must still be able to check the wrap and the DER.
share.cekandshare.iv, when set, are that test's content key and its IV (16 octets for CBC) or nonce (12 octets for GCM); production leaves them unset.