pub fn decrypt_bytes(&self, ciphertext: &[u8]) -> Result<Vec<u8>, DecryptionError> {
        let CipherText { nonce, ciphertext } = deserialize(ciphertext)?;
        secretbox::open(&ciphertext, &secretbox::Nonce(nonce), &self.encrypt)
            .map_err(DecryptionError::GenericDecryptionError)
    }
/// Decrypts bytestring `ciphertext` encrypted using authenticated symmetric encryption.
///
/// With authenticated encryption we will be able to tell that the message hasn't been
/// tampered with.
///
/// Returns plaintext in case of success.
/// Can return `Error` in case of a deserialisation error, if the ciphertext
/// is not valid, or if it can not be decrypted.
Decrypts bytestring `ciphertext` encrypted using authenticated symmetric encryption.
With authenticated encryption we will be able to tell that the message hasn't been
tampered with.

Returns plaintext in case of success.
Can return `Error` in case of a deserialisation error, if the ciphertext
is not valid, or if it can not be decrypted.
Decrypts bytestring ` ciphertext ` encrypted using authenticated symmetric encryption . With authenticated encryption we will be able to tell that the message hasn ' t been tampered with . Returns plaintext in case of success . Can return ` Error ` in case of a deserialisation error if the ciphertext is not valid or if it can not be decrypted .
pub fn decrypt_bytes(&self, ciphertext: &[u8]) -> Result<Vec<u8>, DecryptionError> {
        let CipherText { nonce, ciphertext } = deserialize(ciphertext)?;
        secretbox::open(&ciphertext, &secretbox::Nonce(nonce), &self.encrypt)
            .map_err(DecryptionError::GenericDecryptionError)
    }
pub fn decrypt_bytes ( & self , ciphertext : & [ u8 ] ) -> Result < Vec < u8 > , DecryptionError > { let CipherText { nonce , ciphertext } = deserialize ( ciphertext ) ? ; secretbox :: open ( & ciphertext , & secretbox :: Nonce ( nonce ) , & self . encrypt ) . map_err ( DecryptionError :: GenericDecryptionError ) }
Decrypts bytestring `ciphertext` encrypted using authenticated symmetric encryption.
Decrypts bytestring ` ciphertext ` encrypted using authenticated symmetric encryption .
&self
ciphertext
&[u8]
&self
ciphertext
&[u8]