Trait cipher::stream::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§
sourcefn encrypt_inout(self, data: InOutBuf<'_, '_, u8>)where
Self: BlockEncryptMut,
fn encrypt_inout(self, data: InOutBuf<'_, '_, u8>)where
Self: BlockEncryptMut,
Encrypt data using InOutBuf
.
sourcefn decrypt_inout(self, data: InOutBuf<'_, '_, u8>)where
Self: BlockDecryptMut,
fn decrypt_inout(self, data: InOutBuf<'_, '_, u8>)where
Self: BlockDecryptMut,
Decrypt data using InOutBuf
.
sourcefn encrypt(self, buf: &mut [u8])where
Self: BlockEncryptMut,
fn encrypt(self, buf: &mut [u8])where
Self: BlockEncryptMut,
Encrypt data in place.
sourcefn decrypt(self, buf: &mut [u8])where
Self: BlockDecryptMut,
fn decrypt(self, buf: &mut [u8])where
Self: BlockDecryptMut,
Decrypt data in place.
sourcefn encrypt_b2b(
self,
in_buf: &[u8],
out_buf: &mut [u8],
) -> Result<(), NotEqualError>where
Self: BlockEncryptMut,
fn encrypt_b2b(
self,
in_buf: &[u8],
out_buf: &mut [u8],
) -> Result<(), NotEqualError>where
Self: BlockEncryptMut,
Encrypt data from buffer to buffer.
sourcefn decrypt_b2b(
self,
in_buf: &[u8],
out_buf: &mut [u8],
) -> Result<(), NotEqualError>where
Self: BlockDecryptMut,
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.