[][src]Struct ctr::Ctr128

pub struct Ctr128<C> where
    C: BlockCipher<BlockSize = U16>,
    C::ParBlocks: ArrayLength<GenericArray<u8, U16>>, 
{ /* fields omitted */ }

CTR mode of operation for 128-bit block ciphers

Methods

impl<C> Ctr128<C> where
    C: BlockCipher<BlockSize = U16>,
    C::ParBlocks: ArrayLength<GenericArray<u8, U16>>, 
[src]

pub fn from_cipher(cipher: C, nonce: &GenericArray<u8, Self::NonceSize>) -> Self[src]

Create new CTR mode instance using initialized block cipher.

Trait Implementations

impl<C> Debug for Ctr128<C> where
    C: BlockCipher<BlockSize = U16>,
    C::ParBlocks: ArrayLength<GenericArray<u8, U16>>, 
[src]

impl<C> NewStreamCipher for Ctr128<C> where
    C: BlockCipher<BlockSize = U16>,
    C::ParBlocks: ArrayLength<GenericArray<u8, U16>>, 
[src]

type KeySize = C::KeySize

Key size in bytes

type NonceSize = C::BlockSize

Nonce size in bytes

impl<C> SyncStreamCipher for Ctr128<C> where
    C: BlockCipher<BlockSize = U16>,
    C::ParBlocks: ArrayLength<GenericArray<u8, U16>>, 
[src]

fn apply_keystream(&mut self, data: &mut [u8])[src]

Apply keystream to the data. Read more

impl<C> SyncStreamCipherSeek for Ctr128<C> where
    C: BlockCipher<BlockSize = U16>,
    C::ParBlocks: ArrayLength<GenericArray<u8, U16>>, 
[src]

Auto Trait Implementations

impl<C> Send for Ctr128<C> where
    C: Send

impl<C> Sync for Ctr128<C> where
    C: Sync

Blanket Implementations

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

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

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

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

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

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

impl<T> Same for T

type Output = T

Should always be Self