cipher

Trait 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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§