[−][src]Struct gost_modes::GostCtr
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]
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,
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]
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>,
type BlockCipher = C
Block cipher
type NonceSize = Quot<<C as BlockCipher>::BlockSize, U2>
Nonce size in bytes
fn from_block_cipher(
cipher: C,
nonce: &GenericArray<u8, Self::NonceSize>
) -> Self
[src]
cipher: C,
nonce: &GenericArray<u8, Self::NonceSize>
) -> Self
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]
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>,
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,
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>,
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>,
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,
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,
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]
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<C> NewStreamCipher for C where
C: FromBlockCipher,
[src]
C: FromBlockCipher,
type KeySize = <<C as FromBlockCipher>::BlockCipher as NewBlockCipher>::KeySize
Key size in bytes
type NonceSize = <C as FromBlockCipher>::NonceSize
Nonce size in bytes
fn new(
key: &GenericArray<u8, <C as NewStreamCipher>::KeySize>,
nonce: &GenericArray<u8, <C as NewStreamCipher>::NonceSize>
) -> C
[src]
key: &GenericArray<u8, <C as NewStreamCipher>::KeySize>,
nonce: &GenericArray<u8, <C as NewStreamCipher>::NonceSize>
) -> C
fn new_var(key: &[u8], nonce: &[u8]) -> Result<C, InvalidKeyNonceLength>
[src]
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<C> StreamCipher for C where
C: SyncStreamCipher,
[src]
C: SyncStreamCipher,
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>,