pub fn encrypt_bytes_with_nonce(
        &self,
        plaintext: &[u8],
        nonce: &Nonce,
    ) -> Result<Vec<u8>, EncryptionError> {
        let ciphertext = secretbox::seal(plaintext, &nonce.nonce, &self.encrypt);
        Ok(serialize(&CipherText {
            nonce: nonce.nonce.0,
            ciphertext,
        })?)
    }
/// Encrypts bytestring `plaintext` using authenticated symmetric encryption, with a nonce.
///
/// See `encrypt_bytes`.
Encrypts bytestring `plaintext` using authenticated symmetric encryption, with a nonce.
Encrypts bytestring ` plaintext ` using authenticated symmetric encryption with a nonce .
pub fn encrypt_bytes_with_nonce(
        &self,
        plaintext: &[u8],
        nonce: &Nonce,
    ) -> Result<Vec<u8>, EncryptionError> {
        let ciphertext = secretbox::seal(plaintext, &nonce.nonce, &self.encrypt);
        Ok(serialize(&CipherText {
            nonce: nonce.nonce.0,
            ciphertext,
        })?)
    }
pub fn encrypt_bytes_with_nonce ( & self , plaintext : & [ u8 ] , nonce : & Nonce , ) -> Result < Vec < u8 > , EncryptionError > { let ciphertext = secretbox :: seal ( plaintext , & nonce . nonce , & self . encrypt ) ; Ok ( serialize ( & CipherText { nonce : nonce . nonce . 0 , ciphertext , } ) ? ) }
Encrypts bytestring `plaintext` using authenticated symmetric encryption, with a nonce.
Encrypts bytestring ` plaintext ` using authenticated symmetric encryption with a nonce .
&self
plaintext
&[u8]
nonce
&Nonce
&self
plaintext
&[u8]
nonce
&Nonce