[−][src]Struct gost_modes::GostCbc
Cipher Block Chaining (CBC) block mode instance as defined in GOST R 34.13-2015.
Type parameters:
C
: block cipher.Z
: nonce length in block sizes. Default: 1.
With default parameters this mode is fully equivalent to the Cbc
mode defined
in the block-modes
crate.
Trait Implementations
impl<C, P, Z> BlockMode<C, P> for GostCbc<C, P, Z> where
C: BlockCipher + NewBlockCipher,
C::BlockSize: IsLessOrEqual<U255>,
Z: ArrayLength<Block<C>> + Unsigned + Mul<C::BlockSize> + IsGreater<U0> + IsLessOrEqual<U255>,
Prod<Z, C::BlockSize>: ArrayLength<u8>,
P: Padding,
[src]
C: BlockCipher + NewBlockCipher,
C::BlockSize: IsLessOrEqual<U255>,
Z: ArrayLength<Block<C>> + Unsigned + Mul<C::BlockSize> + IsGreater<U0> + IsLessOrEqual<U255>,
Prod<Z, C::BlockSize>: ArrayLength<u8>,
P: Padding,
type IvSize = Prod<Z, C::BlockSize>
Initialization Vector size.
fn new(cipher: C, iv: &GenericArray<u8, Self::IvSize>) -> Self
[src]
fn encrypt_blocks(&mut self, blocks: &mut [Block<C>])
[src]
fn decrypt_blocks(&mut self, blocks: &mut [Block<C>])
[src]
fn new_fix(
key: &GenericArray<u8, <C as NewBlockCipher>::KeySize>,
iv: &GenericArray<u8, Self::IvSize>
) -> Self
[src]
key: &GenericArray<u8, <C as NewBlockCipher>::KeySize>,
iv: &GenericArray<u8, Self::IvSize>
) -> Self
fn new_var(key: &[u8], iv: &[u8]) -> Result<Self, InvalidKeyIvLength>
[src]
fn encrypt(self, buffer: &mut [u8], pos: usize) -> Result<&[u8], BlockModeError>
[src]
fn decrypt(self, buffer: &mut [u8]) -> Result<&[u8], BlockModeError>
[src]
fn encrypt_vec(self, plaintext: &[u8]) -> Vec<u8>
[src]
fn decrypt_vec(self, ciphertext: &[u8]) -> Result<Vec<u8>, BlockModeError>
[src]
impl<C: Clone, P: Clone, Z: Clone> Clone for GostCbc<C, P, Z> where
C: BlockCipher + NewBlockCipher,
C::BlockSize: IsLessOrEqual<U255>,
Z: ArrayLength<Block<C>> + Unsigned + Mul<C::BlockSize> + IsGreater<U0> + IsLessOrEqual<U255>,
Prod<Z, C::BlockSize>: ArrayLength<u8>,
P: Padding,
[src]
C: BlockCipher + NewBlockCipher,
C::BlockSize: IsLessOrEqual<U255>,
Z: ArrayLength<Block<C>> + Unsigned + Mul<C::BlockSize> + IsGreater<U0> + IsLessOrEqual<U255>,
Prod<Z, C::BlockSize>: ArrayLength<u8>,
P: Padding,
Auto Trait Implementations
impl<C, P, Z> RefUnwindSafe for GostCbc<C, P, Z> where
C: RefUnwindSafe,
P: RefUnwindSafe,
Z: RefUnwindSafe,
<Z as ArrayLength<GenericArray<u8, <C as BlockCipher>::BlockSize>>>::ArrayType: RefUnwindSafe,
C: RefUnwindSafe,
P: RefUnwindSafe,
Z: RefUnwindSafe,
<Z as ArrayLength<GenericArray<u8, <C as BlockCipher>::BlockSize>>>::ArrayType: RefUnwindSafe,
impl<C, P, Z> Send for GostCbc<C, P, Z> where
C: Send,
P: Send,
Z: Send,
<C as BlockCipher>::BlockSize: ArrayLength<u8>,
C: Send,
P: Send,
Z: Send,
<C as BlockCipher>::BlockSize: ArrayLength<u8>,
impl<C, P, Z> Sync for GostCbc<C, P, Z> where
C: Sync,
P: Sync,
Z: Sync,
<C as BlockCipher>::BlockSize: ArrayLength<u8>,
C: Sync,
P: Sync,
Z: Sync,
<C as BlockCipher>::BlockSize: ArrayLength<u8>,
impl<C, P, Z> Unpin for GostCbc<C, P, Z> where
C: Unpin,
P: Unpin,
Z: Unpin,
<Z as ArrayLength<GenericArray<u8, <C as BlockCipher>::BlockSize>>>::ArrayType: Unpin,
C: Unpin,
P: Unpin,
Z: Unpin,
<Z as ArrayLength<GenericArray<u8, <C as BlockCipher>::BlockSize>>>::ArrayType: Unpin,
impl<C, P, Z> UnwindSafe for GostCbc<C, P, Z> where
C: UnwindSafe,
P: UnwindSafe,
Z: UnwindSafe,
<Z as ArrayLength<GenericArray<u8, <C as BlockCipher>::BlockSize>>>::ArrayType: UnwindSafe,
C: UnwindSafe,
P: UnwindSafe,
Z: UnwindSafe,
<Z as ArrayLength<GenericArray<u8, <C as BlockCipher>::BlockSize>>>::ArrayType: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,