pub trait BlockDecrypt: BlockSizeUser {
// Required method
fn decrypt_with_backend(
&self,
f: impl BlockClosure<BlockSize = Self::BlockSize>,
);
// Provided methods
fn decrypt_block_inout(&self, block: InOut<'_, '_, Block<Self>>) { ... }
fn decrypt_blocks_inout(&self, blocks: InOutBuf<'_, '_, Block<Self>>) { ... }
fn decrypt_block(&self, block: &mut Block<Self>) { ... }
fn decrypt_block_b2b(
&self,
in_block: &Block<Self>,
out_block: &mut Block<Self>,
) { ... }
fn decrypt_blocks(&self, blocks: &mut [Block<Self>]) { ... }
fn decrypt_blocks_b2b(
&self,
in_blocks: &[Block<Self>],
out_blocks: &mut [Block<Self>],
) -> Result<(), NotEqualError> { ... }
}
Expand description
Decrypt-only functionality for block ciphers.
Required Methods§
Sourcefn decrypt_with_backend(
&self,
f: impl BlockClosure<BlockSize = Self::BlockSize>,
)
fn decrypt_with_backend( &self, f: impl BlockClosure<BlockSize = Self::BlockSize>, )
Decrypt data using backend provided to the rank-2 closure.
Provided Methods§
Sourcefn decrypt_block_inout(&self, block: InOut<'_, '_, Block<Self>>)
fn decrypt_block_inout(&self, block: InOut<'_, '_, Block<Self>>)
Decrypt single inout
block.
Sourcefn decrypt_blocks_inout(&self, blocks: InOutBuf<'_, '_, Block<Self>>)
fn decrypt_blocks_inout(&self, blocks: InOutBuf<'_, '_, Block<Self>>)
Decrypt inout
blocks.
Sourcefn decrypt_block(&self, block: &mut Block<Self>)
fn decrypt_block(&self, block: &mut Block<Self>)
Decrypt single block in-place.
Sourcefn decrypt_block_b2b(&self, in_block: &Block<Self>, out_block: &mut Block<Self>)
fn decrypt_block_b2b(&self, in_block: &Block<Self>, out_block: &mut Block<Self>)
Decrypt in_block
and write result to out_block
.
Sourcefn decrypt_blocks(&self, blocks: &mut [Block<Self>])
fn decrypt_blocks(&self, blocks: &mut [Block<Self>])
Decrypt blocks in-place.
Sourcefn decrypt_blocks_b2b(
&self,
in_blocks: &[Block<Self>],
out_blocks: &mut [Block<Self>],
) -> Result<(), NotEqualError>
fn decrypt_blocks_b2b( &self, in_blocks: &[Block<Self>], out_blocks: &mut [Block<Self>], ) -> Result<(), NotEqualError>
Decrypt blocks buffer-to-buffer.
Returns NotEqualError
if provided in_blocks
and out_blocks
have different lengths.
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.