pub struct Ctr128<C> where
C: BlockCipher<BlockSize = U16>,
C::ParBlocks: ArrayLength<GenericArray<u8, U16>>, { /* private fields */ }
Expand description
CTR mode of operation for 128-bit block ciphers
Implementations
sourceimpl<C> Ctr128<C> where
C: BlockCipher<BlockSize = U16>,
C::ParBlocks: ArrayLength<GenericArray<u8, U16>>,
impl<C> Ctr128<C> where
C: BlockCipher<BlockSize = U16>,
C::ParBlocks: ArrayLength<GenericArray<u8, U16>>,
sourcepub fn from_cipher(
cipher: C,
nonce: &GenericArray<u8, <Self as NewStreamCipher>::NonceSize>
) -> Self
pub fn from_cipher(
cipher: C,
nonce: &GenericArray<u8, <Self as NewStreamCipher>::NonceSize>
) -> Self
Create new CTR mode instance using initialized block cipher.
Trait Implementations
sourceimpl<C> Debug for Ctr128<C> where
C: BlockCipher<BlockSize = U16>,
C::ParBlocks: ArrayLength<GenericArray<u8, U16>>,
impl<C> Debug for Ctr128<C> where
C: BlockCipher<BlockSize = U16>,
C::ParBlocks: ArrayLength<GenericArray<u8, U16>>,
sourceimpl<C> NewStreamCipher for Ctr128<C> where
C: BlockCipher<BlockSize = U16>,
C::ParBlocks: ArrayLength<GenericArray<u8, U16>>,
impl<C> NewStreamCipher for Ctr128<C> where
C: BlockCipher<BlockSize = U16>,
C::ParBlocks: ArrayLength<GenericArray<u8, U16>>,
sourcefn new(
key: &GenericArray<u8, Self::KeySize>,
nonce: &GenericArray<u8, <Self as NewStreamCipher>::NonceSize>
) -> Self
fn new(
key: &GenericArray<u8, Self::KeySize>,
nonce: &GenericArray<u8, <Self as NewStreamCipher>::NonceSize>
) -> Self
Create new stream cipher instance from variable length key and nonce.
sourceimpl<C> SyncStreamCipher for Ctr128<C> where
C: BlockCipher<BlockSize = U16>,
C::ParBlocks: ArrayLength<GenericArray<u8, U16>>,
impl<C> SyncStreamCipher for Ctr128<C> where
C: BlockCipher<BlockSize = U16>,
C::ParBlocks: ArrayLength<GenericArray<u8, U16>>,
sourceimpl<C> SyncStreamCipherSeek for Ctr128<C> where
C: BlockCipher<BlockSize = U16>,
C::ParBlocks: ArrayLength<GenericArray<u8, U16>>,
impl<C> SyncStreamCipherSeek for Ctr128<C> where
C: BlockCipher<BlockSize = U16>,
C::ParBlocks: ArrayLength<GenericArray<u8, U16>>,
Auto Trait Implementations
impl<C> RefUnwindSafe for Ctr128<C> where
C: RefUnwindSafe,
impl<C> Send for Ctr128<C> where
C: Send,
impl<C> Sync for Ctr128<C> where
C: Sync,
impl<C> Unpin for Ctr128<C> where
C: Unpin,
impl<C> UnwindSafe for Ctr128<C> where
C: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more