Struct ctr::Ctr128 [−][src]
pub struct Ctr128<C> where
C: BlockCipher<BlockSize = U16>,
C::ParBlocks: ArrayLength<GenArr<u8, U16>>, { /* fields omitted */ }
CTR mode of operation for 128-bit block ciphers
Trait Implementations
impl<C> NewFixStreamCipher for Ctr128<C> where
C: BlockCipher<BlockSize = U16>,
C::ParBlocks: ArrayLength<GenArr<u8, U16>>,
[src]
impl<C> NewFixStreamCipher for Ctr128<C> where
C: BlockCipher<BlockSize = U16>,
C::ParBlocks: ArrayLength<GenArr<u8, U16>>,
type KeySize = C::KeySize
Key size in bytes
type NonceSize = C::BlockSize
Nonce size in bytes
fn new(
key: &GenArr<u8, Self::KeySize>,
nonce: &GenArr<u8, Self::NonceSize>
) -> Self
[src]
fn new(
key: &GenArr<u8, Self::KeySize>,
nonce: &GenArr<u8, Self::NonceSize>
) -> Self
Create new stream cipher instance
impl<C> StreamCipherCore for Ctr128<C> where
C: BlockCipher<BlockSize = U16>,
C::ParBlocks: ArrayLength<GenArr<u8, U16>>,
[src]
impl<C> StreamCipherCore for Ctr128<C> where
C: BlockCipher<BlockSize = U16>,
C::ParBlocks: ArrayLength<GenArr<u8, U16>>,
fn try_apply_keystream(&mut self, data: &mut [u8]) -> Result<(), LoopError>
[src]
fn try_apply_keystream(&mut self, data: &mut [u8]) -> Result<(), LoopError>
Apply keystream to the data, but return an error if end of a keystream will be reached. Read more
fn apply_keystream(&mut self, data: &mut [u8])
[src]
fn apply_keystream(&mut self, data: &mut [u8])
Apply keystream to the data. Read more
impl<C> StreamCipherSeek for Ctr128<C> where
C: BlockCipher<BlockSize = U16>,
C::ParBlocks: ArrayLength<GenArr<u8, U16>>,
[src]
impl<C> StreamCipherSeek for Ctr128<C> where
C: BlockCipher<BlockSize = U16>,
C::ParBlocks: ArrayLength<GenArr<u8, U16>>,
fn current_pos(&self) -> u64
[src]
fn current_pos(&self) -> u64
Return current position of a keystream in bytes from the beginning.
fn seek(&mut self, pos: u64)
[src]
fn seek(&mut self, pos: u64)
Seek keystream to the given pos
in bytes.
impl<C> Debug for Ctr128<C> where
C: BlockCipher<BlockSize = U16>,
C::ParBlocks: ArrayLength<GenArr<u8, U16>>,
[src]
impl<C> Debug for Ctr128<C> where
C: BlockCipher<BlockSize = U16>,
C::ParBlocks: ArrayLength<GenArr<u8, U16>>,