pub struct Cbc<B: BlockCipher + Zeroize + ZeroizeOnDrop> { /* private fields */ }
Expand description
CBC mode implementation
Implementations§
Source§impl<B: BlockCipher + CipherAlgorithm + Zeroize + ZeroizeOnDrop> Cbc<B>
impl<B: BlockCipher + CipherAlgorithm + Zeroize + ZeroizeOnDrop> Cbc<B>
Sourcepub fn new<const N: usize>(cipher: B, iv: &Nonce<N>) -> Result<Self>where
Nonce<N>: CbcCompatible,
pub fn new<const N: usize>(cipher: B, iv: &Nonce<N>) -> Result<Self>where
Nonce<N>: CbcCompatible,
Creates a new CBC mode instance with the given cipher and IV
The IV (nonce) must be the same size as the block size of the cipher.
Trait Implementations§
Source§impl<B: Clone + BlockCipher + Zeroize + ZeroizeOnDrop> Clone for Cbc<B>
impl<B: Clone + BlockCipher + Zeroize + ZeroizeOnDrop> Clone for Cbc<B>
Source§impl<B: BlockCipher + Zeroize + ZeroizeOnDrop> Drop for Cbc<B>
impl<B: BlockCipher + Zeroize + ZeroizeOnDrop> Drop for Cbc<B>
Auto Trait Implementations§
impl<B> Freeze for Cbc<B>where
B: Freeze,
impl<B> RefUnwindSafe for Cbc<B>where
B: RefUnwindSafe,
impl<B> Send for Cbc<B>where
B: Send,
impl<B> Sync for Cbc<B>where
B: Sync,
impl<B> Unpin for Cbc<B>where
B: Unpin,
impl<B> UnwindSafe for Cbc<B>where
B: 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