pub fn encrypt_bytes(&self, plaintext: &[u8]) -> Result<Vec<u8>, EncryptionError> {
        let nonce = box_::gen_nonce();
        let ciphertext = box_::seal_precomputed(plaintext, &nonce, &self.precomputed);
        Ok(serialize(&CipherText {
            nonce: nonce.0,
            ciphertext,
        })?)
    }
/// Encrypts bytestring `plaintext` using authenticated encryption.
///
/// With authenticated encryption the recipient will be able to verify the authenticity
/// of the sender using a sender's public key.
/// If you want to use anonymous encryption, use the functions provided by `PublicKeys`
/// and `SecretKeys`.
///
/// Returns ciphertext in case of success.
/// Can return an `Error` in case of a serialisation error.
Encrypts bytestring `plaintext` using authenticated encryption.
With authenticated encryption the recipient will be able to verify the authenticity
of the sender using a sender's public key.
If you want to use anonymous encryption, use the functions provided by `PublicKeys`
and `SecretKeys`.

Returns ciphertext in case of success.
Can return an `Error` in case of a serialisation error.
Encrypts bytestring ` plaintext ` using authenticated encryption . With authenticated encryption the recipient will be able to verify the authenticity of the sender using a sender ' s public key . If you want to use anonymous encryption use the functions provided by ` PublicKeys ` and ` SecretKeys ` . Returns ciphertext in case of success . Can return an ` Error ` in case of a serialisation error .
pub fn encrypt_bytes(&self, plaintext: &[u8]) -> Result<Vec<u8>, EncryptionError> {
        let nonce = box_::gen_nonce();
        let ciphertext = box_::seal_precomputed(plaintext, &nonce, &self.precomputed);
        Ok(serialize(&CipherText {
            nonce: nonce.0,
            ciphertext,
        })?)
    }
pub fn encrypt_bytes ( & self , plaintext : & [ u8 ] ) -> Result < Vec < u8 > , EncryptionError > { let nonce = box_ :: gen_nonce ( ) ; let ciphertext = box_ :: seal_precomputed ( plaintext , & nonce , & self . precomputed ) ; Ok ( serialize ( & CipherText { nonce : nonce . 0 , ciphertext , } ) ? ) }
Encrypts bytestring `plaintext` using authenticated encryption.
Encrypts bytestring ` plaintext ` using authenticated encryption .
&self
plaintext
&[u8]
&self
plaintext
&[u8]