pub struct Pcbc<C: BlockCipher + BlockEncrypt + BlockDecrypt, P: Padding> { /* private fields */ }
Expand description
Propagating Cipher Block Chaining (PCBC) mode instance.
Implementations§
Trait Implementations§
Source§impl<C, P> BlockMode<C, P> for Pcbc<C, P>
impl<C, P> BlockMode<C, P> for Pcbc<C, P>
Source§type IvSize = <C as BlockCipher>::BlockSize
type IvSize = <C as BlockCipher>::BlockSize
Initialization Vector size.
Source§fn new(cipher: C, iv: &GenericArray<u8, C::BlockSize>) -> Self
fn new(cipher: C, iv: &GenericArray<u8, C::BlockSize>) -> Self
Create a new block mode instance from initialized block cipher and IV.
Source§fn encrypt_blocks(
&mut self,
blocks: &mut [GenericArray<u8, <C as BlockCipher>::BlockSize>],
)
fn encrypt_blocks( &mut self, blocks: &mut [GenericArray<u8, <C as BlockCipher>::BlockSize>], )
Encrypt blocks of data
Source§fn decrypt_blocks(
&mut self,
blocks: &mut [GenericArray<u8, <C as BlockCipher>::BlockSize>],
)
fn decrypt_blocks( &mut self, blocks: &mut [GenericArray<u8, <C as BlockCipher>::BlockSize>], )
Decrypt blocks of data
Source§fn new_fix(
key: &GenericArray<u8, <C as NewBlockCipher>::KeySize>,
iv: &GenericArray<u8, Self::IvSize>,
) -> Selfwhere
C: NewBlockCipher,
fn new_fix(
key: &GenericArray<u8, <C as NewBlockCipher>::KeySize>,
iv: &GenericArray<u8, Self::IvSize>,
) -> Selfwhere
C: NewBlockCipher,
Create a new block mode instance from fixed sized key and IV.
Source§fn new_from_slices(key: &[u8], iv: &[u8]) -> Result<Self, InvalidKeyIvLength>where
C: NewBlockCipher,
fn new_from_slices(key: &[u8], iv: &[u8]) -> Result<Self, InvalidKeyIvLength>where
C: NewBlockCipher,
Create a new block mode instance from variable size key and IV. Read more
Source§fn encrypt(self, buffer: &mut [u8], pos: usize) -> Result<&[u8], BlockModeError>
fn encrypt(self, buffer: &mut [u8], pos: usize) -> Result<&[u8], BlockModeError>
Encrypt message in-place. Read more
Source§fn decrypt(self, buffer: &mut [u8]) -> Result<&[u8], BlockModeError>
fn decrypt(self, buffer: &mut [u8]) -> Result<&[u8], BlockModeError>
Decrypt message in-place. Read more
Source§fn encrypt_vec(self, plaintext: &[u8]) -> Vec<u8> ⓘ
fn encrypt_vec(self, plaintext: &[u8]) -> Vec<u8> ⓘ
Encrypt message and store result in vector.
Source§fn decrypt_vec(self, ciphertext: &[u8]) -> Result<Vec<u8>, BlockModeError>
fn decrypt_vec(self, ciphertext: &[u8]) -> Result<Vec<u8>, BlockModeError>
Encrypt message and store result in vector.
Source§impl<C: Clone + BlockCipher + BlockEncrypt + BlockDecrypt, P: Clone + Padding> Clone for Pcbc<C, P>
impl<C: Clone + BlockCipher + BlockEncrypt + BlockDecrypt, P: Clone + Padding> Clone for Pcbc<C, P>
Auto Trait Implementations§
impl<C, P> Freeze for Pcbc<C, P>
impl<C, P> RefUnwindSafe for Pcbc<C, P>where
C: RefUnwindSafe,
<<C as BlockCipher>::BlockSize as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
P: RefUnwindSafe,
impl<C, P> Send for Pcbc<C, P>
impl<C, P> Sync for Pcbc<C, P>
impl<C, P> Unpin for Pcbc<C, P>
impl<C, P> UnwindSafe for Pcbc<C, P>where
C: UnwindSafe,
<<C as BlockCipher>::BlockSize as ArrayLength<u8>>::ArrayType: UnwindSafe,
P: 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