Struct gost_modes::GostCfb[][src]

pub struct GostCfb<C, M = <C as BlockCipher>::BlockSize, S = <C as BlockCipher>::BlockSize> where
    C: BlockCipher + BlockEncrypt + NewBlockCipher,
    C::BlockSize: IsLessOrEqual<U255>,
    M: Unsigned + ArrayLength<u8> + IsGreaterOrEqual<C::BlockSize> + Sub<C::BlockSize>,
    S: Unsigned + ArrayLength<u8> + IsGreater<U0> + IsLessOrEqual<C::BlockSize>,
    Diff<M, C::BlockSize>: ArrayLength<u8>, 
{ /* fields omitted */ }

Cipher feedback (CFB) mode of operation as defined in GOST R 34.13-2015

Type parameters:

  • C: block cipher.
  • M: nonce length in bytes. Default: block size.
  • S: number of block bytes used for message encryption. Default: block size.

With default parameters this mode is fully equivalent to the Cfb mode defined in the cfb-mode crate.

Trait Implementations

impl<C, M, S> AsyncStreamCipher for GostCfb<C, M, S> where
    C: BlockCipher + BlockEncrypt + NewBlockCipher,
    C::BlockSize: IsLessOrEqual<U255>,
    M: Unsigned + ArrayLength<u8> + IsGreaterOrEqual<C::BlockSize> + Sub<C::BlockSize>,
    S: Unsigned + ArrayLength<u8> + IsGreater<U0> + IsLessOrEqual<C::BlockSize>,
    Diff<M, C::BlockSize>: ArrayLength<u8>, 
[src]

impl<C: Clone, M: Clone, S: Clone> Clone for GostCfb<C, M, S> where
    C: BlockCipher + BlockEncrypt + NewBlockCipher,
    C::BlockSize: IsLessOrEqual<U255>,
    M: Unsigned + ArrayLength<u8> + IsGreaterOrEqual<C::BlockSize> + Sub<C::BlockSize>,
    S: Unsigned + ArrayLength<u8> + IsGreater<U0> + IsLessOrEqual<C::BlockSize>,
    Diff<M, C::BlockSize>: ArrayLength<u8>, 
[src]

impl<C, M, S> FromBlockCipher for GostCfb<C, M, S> where
    C: BlockCipher + BlockEncrypt + NewBlockCipher,
    C::BlockSize: IsLessOrEqual<U255>,
    M: Unsigned + ArrayLength<u8> + IsGreaterOrEqual<C::BlockSize> + Sub<C::BlockSize>,
    S: Unsigned + ArrayLength<u8> + IsGreater<U0> + IsLessOrEqual<C::BlockSize>,
    Diff<M, C::BlockSize>: ArrayLength<u8>, 
[src]

type BlockCipher = C

Block cipher

type NonceSize = M

Nonce size in bytes

Auto Trait Implementations

impl<C, M, S> RefUnwindSafe for GostCfb<C, M, S> where
    C: RefUnwindSafe,
    <S as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
    <<M as Sub<<C as BlockCipher>::BlockSize>>::Output as ArrayLength<u8>>::ArrayType: RefUnwindSafe

impl<C, M, S> Send for GostCfb<C, M, S> where
    C: Send

impl<C, M, S> Sync for GostCfb<C, M, S> where
    C: Sync

impl<C, M, S> Unpin for GostCfb<C, M, S> where
    C: Unpin,
    <S as ArrayLength<u8>>::ArrayType: Unpin,
    <<M as Sub<<C as BlockCipher>::BlockSize>>::Output as ArrayLength<u8>>::ArrayType: Unpin

impl<C, M, S> UnwindSafe for GostCfb<C, M, S> where
    C: UnwindSafe,
    <S as ArrayLength<u8>>::ArrayType: UnwindSafe,
    <<M as Sub<<C as BlockCipher>::BlockSize>>::Output as ArrayLength<u8>>::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.