[][src]Struct gost_modes::GostCtr

pub struct GostCtr<C, S = <C as BlockCipher>::BlockSize> where
    C: BlockCipher + NewBlockCipher,
    C::BlockSize: Div<U8> + Rem<U8> + Div<U2> + IsLessOrEqual<U255>,
    Mod<C::BlockSize, U8>: IsEqual<U0>,
    S: Unsigned + IsGreater<U0> + IsLessOrEqual<C::BlockSize>,
    Quot<C::BlockSize, U8>: ArrayLength<u64>,
    Quot<C::BlockSize, U2>: ArrayLength<u8>, 
{ /* fields omitted */ }

Counter (CTR) block mode instance as defined in GOST R 34.13-2015.

Type parameters:

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

Trait Implementations

impl<C: Clone, S: Clone> Clone for GostCtr<C, S> where
    C: BlockCipher + NewBlockCipher,
    C::BlockSize: Div<U8> + Rem<U8> + Div<U2> + IsLessOrEqual<U255>,
    Mod<C::BlockSize, U8>: IsEqual<U0>,
    S: Unsigned + IsGreater<U0> + IsLessOrEqual<C::BlockSize>,
    Quot<C::BlockSize, U8>: ArrayLength<u64>,
    Quot<C::BlockSize, U2>: ArrayLength<u8>,
    C::BlockSize: Clone
[src]

impl<C, S> FromBlockCipher for GostCtr<C, S> where
    C: BlockCipher + NewBlockCipher,
    C::BlockSize: Div<U8> + Rem<U8> + Div<U2> + IsLessOrEqual<U255>,
    Mod<C::BlockSize, U8>: IsEqual<U0>,
    S: Unsigned + IsGreater<U0> + IsLessOrEqual<C::BlockSize>,
    Quot<C::BlockSize, U8>: ArrayLength<u64>,
    Quot<C::BlockSize, U2>: ArrayLength<u8>, 
[src]

type BlockCipher = C

Block cipher

type NonceSize = Quot<<C as BlockCipher>::BlockSize, U2>

Nonce size in bytes

impl<C, S> SyncStreamCipher for GostCtr<C, S> where
    C: BlockCipher + NewBlockCipher,
    C::BlockSize: Div<U8> + Rem<U8> + Div<U2> + IsLessOrEqual<U255>,
    Mod<C::BlockSize, U8>: IsEqual<U0>,
    S: Unsigned + IsGreater<U0> + IsLessOrEqual<C::BlockSize>,
    Quot<C::BlockSize, U8>: ArrayLength<u64>,
    Quot<C::BlockSize, U2>: ArrayLength<u8>, 
[src]

Auto Trait Implementations

impl<C, S> RefUnwindSafe for GostCtr<C, S> where
    C: RefUnwindSafe,
    S: RefUnwindSafe,
    <<C as BlockCipher>::BlockSize as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
    <<<C as BlockCipher>::BlockSize as Div<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>>>::Output as ArrayLength<u64>>::ArrayType: RefUnwindSafe

impl<C, S> Send for GostCtr<C, S> where
    C: Send,
    S: Send,
    <C as BlockCipher>::BlockSize: ArrayLength<u8>, 

impl<C, S> Sync for GostCtr<C, S> where
    C: Sync,
    S: Sync,
    <C as BlockCipher>::BlockSize: ArrayLength<u8>, 

impl<C, S> Unpin for GostCtr<C, S> where
    C: Unpin,
    S: Unpin,
    <<C as BlockCipher>::BlockSize as ArrayLength<u8>>::ArrayType: Unpin,
    <<<C as BlockCipher>::BlockSize as Div<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>>>::Output as ArrayLength<u64>>::ArrayType: Unpin

impl<C, S> UnwindSafe for GostCtr<C, S> where
    C: UnwindSafe,
    S: UnwindSafe,
    <<C as BlockCipher>::BlockSize as ArrayLength<u8>>::ArrayType: UnwindSafe,
    <<<C as BlockCipher>::BlockSize as Div<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>>>::Output as ArrayLength<u64>>::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<C> NewStreamCipher for C where
    C: FromBlockCipher
[src]

type KeySize = <<C as FromBlockCipher>::BlockCipher as NewBlockCipher>::KeySize

Key size in bytes

type NonceSize = <C as FromBlockCipher>::NonceSize

Nonce size in bytes

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<C> StreamCipher for C where
    C: SyncStreamCipher
[src]

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.