pub fn seal(plaintext: &[u8], recipient: &PublicKeyBundle) -> Result<Envelope>Expand description
Encrypt plaintext for recipient.
A fresh hybrid KEM (X25519 + ML-KEM-1024) run derives a one-time AES-256-GCM key; the entire envelope header (format version, suite, both KEM components, and nonce) is bound into the authentication tag as associated data.
ยงErrors
Returns Error::MessageTooLarge for plaintexts over
MAX_PLAINTEXT_LEN and Error::RandomnessUnavailable if the OS RNG
fails.