pub struct ZeroTweak<C: TweakSizeUser + BlockSizeUser>(pub C);Expand description
Wrapper around tweakable block cipher which implements the common block cipher traits using zero tweak.
Tuple Fields§
§0: CTrait Implementations§
Source§impl<C: TweakBlockCipherDecrypt> BlockCipherDecrypt for ZeroTweak<C>
impl<C: TweakBlockCipherDecrypt> BlockCipherDecrypt for ZeroTweak<C>
Source§fn decrypt_with_backend(
&self,
f: impl BlockCipherDecClosure<BlockSize = Self::BlockSize>,
)
fn decrypt_with_backend( &self, f: impl BlockCipherDecClosure<BlockSize = Self::BlockSize>, )
Decrypt data using backend provided to the rank-2 closure.
Source§fn decrypt_block_inout(&self, block: InOut<'_, '_, Block<Self>>)
fn decrypt_block_inout(&self, block: InOut<'_, '_, Block<Self>>)
Decrypt single
inout block.Source§fn decrypt_blocks_inout(&self, blocks: InOutBuf<'_, '_, Block<Self>>)
fn decrypt_blocks_inout(&self, blocks: InOutBuf<'_, '_, Block<Self>>)
Decrypt
inout blocks.Source§fn decrypt_block(&self, block: &mut Block<Self>)
fn decrypt_block(&self, block: &mut Block<Self>)
Decrypt single block in-place.
Source§fn 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.Source§fn decrypt_blocks(&self, blocks: &mut [Block<Self>])
fn decrypt_blocks(&self, blocks: &mut [Block<Self>])
Decrypt blocks in-place.
Source§fn 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. Read more
Source§impl<C: TweakBlockCipherEncrypt> BlockCipherEncrypt for ZeroTweak<C>
impl<C: TweakBlockCipherEncrypt> BlockCipherEncrypt for ZeroTweak<C>
Source§fn encrypt_with_backend(
&self,
f: impl BlockCipherEncClosure<BlockSize = Self::BlockSize>,
)
fn encrypt_with_backend( &self, f: impl BlockCipherEncClosure<BlockSize = Self::BlockSize>, )
Encrypt data using backend provided to the rank-2 closure.
Source§fn encrypt_block_inout(&self, block: InOut<'_, '_, Block<Self>>)
fn encrypt_block_inout(&self, block: InOut<'_, '_, Block<Self>>)
Encrypt single
inout block.Source§fn encrypt_blocks_inout(&self, blocks: InOutBuf<'_, '_, Block<Self>>)
fn encrypt_blocks_inout(&self, blocks: InOutBuf<'_, '_, Block<Self>>)
Encrypt
inout blocks.Source§fn encrypt_block(&self, block: &mut Block<Self>)
fn encrypt_block(&self, block: &mut Block<Self>)
Encrypt single block in-place.
Source§fn encrypt_block_b2b(&self, in_block: &Block<Self>, out_block: &mut Block<Self>)
fn encrypt_block_b2b(&self, in_block: &Block<Self>, out_block: &mut Block<Self>)
Encrypt
in_block and write result to out_block.Source§fn encrypt_blocks(&self, blocks: &mut [Block<Self>])
fn encrypt_blocks(&self, blocks: &mut [Block<Self>])
Encrypt blocks in-place.
Source§fn encrypt_blocks_b2b(
&self,
in_blocks: &[Block<Self>],
out_blocks: &mut [Block<Self>],
) -> Result<(), NotEqualError>
fn encrypt_blocks_b2b( &self, in_blocks: &[Block<Self>], out_blocks: &mut [Block<Self>], ) -> Result<(), NotEqualError>
Encrypt blocks buffer-to-buffer. Read more
Source§impl<C: TweakSizeUser + BlockSizeUser> BlockSizeUser for ZeroTweak<C>
impl<C: TweakSizeUser + BlockSizeUser> BlockSizeUser for ZeroTweak<C>
Source§type BlockSize = <C as BlockSizeUser>::BlockSize
type BlockSize = <C as BlockSizeUser>::BlockSize
Size of the block in bytes.
Source§fn block_size() -> usize
fn block_size() -> usize
Return block size in bytes.
Source§impl<C: Clone + TweakSizeUser + BlockSizeUser> Clone for ZeroTweak<C>
impl<C: Clone + TweakSizeUser + BlockSizeUser> Clone for ZeroTweak<C>
Auto Trait Implementations§
impl<C> Freeze for ZeroTweak<C>where
C: Freeze,
impl<C> RefUnwindSafe for ZeroTweak<C>where
C: RefUnwindSafe,
impl<C> Send for ZeroTweak<C>where
C: Send,
impl<C> Sync for ZeroTweak<C>where
C: Sync,
impl<C> Unpin for ZeroTweak<C>where
C: Unpin,
impl<C> UnwindSafe for ZeroTweak<C>where
C: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more