Struct gost_modes::GostCbc[][src]

pub struct GostCbc<C, P = GostPadding, Z = U1> 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, 
{ /* fields omitted */ }

Cipher Block Chaining (CBC) mode of operation as defined in GOST R 34.13-2015

Type parameters:

  • C: block cipher.
  • P: padding algorithm. Default: GostPadding.
  • 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 + BlockEncrypt + BlockDecrypt + 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]

type IvSize = Prod<Z, C::BlockSize>

Initialization Vector size.

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]

Auto Trait Implementations

impl<C, P, Z> RefUnwindSafe for GostCbc<C, P, Z> where
    C: RefUnwindSafe,
    P: 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

impl<C, P, Z> Sync for GostCbc<C, P, Z> where
    C: Sync,
    P: Sync

impl<C, P, Z> Unpin for GostCbc<C, P, Z> where
    C: Unpin,
    P: 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 as ArrayLength<GenericArray<u8, <C as BlockCipher>::BlockSize>>>::ArrayType: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.