Skip to main content

DecryptOperation

Trait DecryptOperation 

Source
pub trait DecryptOperation<'a, C>: Operation<Vec<u8>>
where C: SymmetricCipher,
{ // Required methods fn with_nonce(self, nonce: &'a <C as SymmetricCipher>::Nonce) -> Self; fn with_aad(self, aad: &'a [u8]) -> Self; fn decrypt( self, ciphertext: &'a <C as SymmetricCipher>::Ciphertext, ) -> Result<Vec<u8>, Error>; }
Expand description

Base trait for decryption operations

Required Methods§

Source

fn with_nonce(self, nonce: &'a <C as SymmetricCipher>::Nonce) -> Self

Set the nonce for decryption

Source

fn with_aad(self, aad: &'a [u8]) -> Self

Set associated data for authenticated decryption

Source

fn decrypt( self, ciphertext: &'a <C as SymmetricCipher>::Ciphertext, ) -> Result<Vec<u8>, Error>

Set ciphertext and execute decryption

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'a, B> DecryptOperation<'a, Gcm<B>> for GcmDecryptOperation<'a, B>

Source§

fn with_nonce( self, nonce: &'a <Gcm<B> as SymmetricCipher>::Nonce, ) -> GcmDecryptOperation<'a, B>

Source§

fn with_aad(self, aad: &'a [u8]) -> GcmDecryptOperation<'a, B>

Source§

fn decrypt( self, ciphertext: &'a <Gcm<B> as SymmetricCipher>::Ciphertext, ) -> Result<Vec<u8>, Error>

Source§

impl<'a> DecryptOperation<'a, ChaCha20Poly1305> for ChaCha20Poly1305DecryptOperation<'a>

Implementors§