Trait cipher::AsyncStreamCipher

source ·
pub trait AsyncStreamCipher: Sized {
    // Provided methods
    fn encrypt_inout(self, data: InOutBuf<'_, '_, u8>)
       where Self: BlockEncryptMut { ... }
    fn decrypt_inout(self, data: InOutBuf<'_, '_, u8>)
       where Self: BlockDecryptMut { ... }
    fn encrypt(self, buf: &mut [u8])
       where Self: BlockEncryptMut { ... }
    fn decrypt(self, buf: &mut [u8])
       where Self: BlockDecryptMut { ... }
    fn encrypt_b2b(
        self,
        in_buf: &[u8],
        out_buf: &mut [u8],
    ) -> Result<(), NotEqualError>
       where Self: BlockEncryptMut { ... }
    fn decrypt_b2b(
        self,
        in_buf: &[u8],
        out_buf: &mut [u8],
    ) -> Result<(), NotEqualError>
       where Self: BlockDecryptMut { ... }
}
Expand description

Marker trait for block-level asynchronous stream ciphers

Provided Methods§

source

fn encrypt_inout(self, data: InOutBuf<'_, '_, u8>)
where Self: BlockEncryptMut,

Encrypt data using InOutBuf.

source

fn decrypt_inout(self, data: InOutBuf<'_, '_, u8>)
where Self: BlockDecryptMut,

Decrypt data using InOutBuf.

source

fn encrypt(self, buf: &mut [u8])
where Self: BlockEncryptMut,

Encrypt data in place.

source

fn decrypt(self, buf: &mut [u8])
where Self: BlockDecryptMut,

Decrypt data in place.

source

fn encrypt_b2b( self, in_buf: &[u8], out_buf: &mut [u8], ) -> Result<(), NotEqualError>
where Self: BlockEncryptMut,

Encrypt data from buffer to buffer.

source

fn decrypt_b2b( self, in_buf: &[u8], out_buf: &mut [u8], ) -> Result<(), NotEqualError>
where Self: BlockDecryptMut,

Decrypt data from buffer to buffer.

Object Safety§

This trait is not object safe.

Implementors§