Encrypts the envelope's subject with a fresh content key and adds a hasRecipient assertion sealing that key to recipient (the reference's encrypt_subject_to_recipient).
hasRecipient
recipient
encrypt_subject_to_recipient
The recipient's public key (implements Encrypter)
rng draws the content key, the subject's nonce and the sealed message's ephemeral key; nonce pins the sealed message's nonce
rng
nonce
A new envelope with encrypted subject and recipient assertion
EnvelopeError InvalidParameter when recipient is not an Encrypter; Components when components cannot seal to the key
InvalidParameter
Encrypter
Components
Encrypts the envelope's subject with a fresh content key and adds a
hasRecipientassertion sealing that key torecipient(the reference'sencrypt_subject_to_recipient).