[−][src]Struct ctr::Ctr128
CTR mode of operation for 128-bit block ciphers
Trait Implementations
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>>, fn fmt(&self, f: &mut Formatter) -> Result<(), Error>[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>Formats the value using the given formatter. Read more
impl<C> NewStreamCipher for Ctr128<C> where
C: BlockCipher<BlockSize = U16>,
C::ParBlocks: ArrayLength<GenArr<u8, U16>>, [src]
impl<C> NewStreamCipher 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>
) -> SelfCreate new stream cipher instance from variable length key and nonce.
fn new_var(key: &[u8], nonce: &[u8]) -> Result<Self, InvalidKeyNonceLength>[src]
fn new_var(key: &[u8], nonce: &[u8]) -> Result<Self, InvalidKeyNonceLength>Create new stream cipher instance from variable length key and nonce.
impl<C> SyncStreamCipher for Ctr128<C> where
C: BlockCipher<BlockSize = U16>,
C::ParBlocks: ArrayLength<GenArr<u8, U16>>, [src]
impl<C> SyncStreamCipher 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> SyncStreamCipherSeek for Ctr128<C> where
C: BlockCipher<BlockSize = U16>,
C::ParBlocks: ArrayLength<GenArr<u8, U16>>, [src]
impl<C> SyncStreamCipherSeek for Ctr128<C> where
C: BlockCipher<BlockSize = U16>,
C::ParBlocks: ArrayLength<GenArr<u8, U16>>, fn current_pos(&self) -> u64[src]
fn current_pos(&self) -> u64Return 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.
Auto Trait Implementations
Blanket Implementations
impl<T> From for T[src]
impl<T> From for Timpl<T, U> TryFrom for T where
T: From<U>, [src]
impl<T, U> TryFrom for T where
T: From<U>, type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>try_from)Performs the conversion.
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
impl<T, U> TryInto for T where
U: TryFrom<T>, type Error = <U as TryFrom<T>>::Error
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>try_from)Performs the conversion.
impl<T, U> Into for T where
U: From<T>, [src]
impl<T, U> Into for T where
U: From<T>, impl<T> Borrow for T where
T: ?Sized, [src]
impl<T> Borrow for T where
T: ?Sized, impl<T> BorrowMut for T where
T: ?Sized, [src]
impl<T> BorrowMut for T where
T: ?Sized, fn borrow_mut(&mut self) -> &mut T[src]
fn borrow_mut(&mut self) -> &mut TMutably borrows from an owned value. Read more
impl<T> Any for T where
T: 'static + ?Sized, [src]
impl<T> Any for T where
T: 'static + ?Sized, fn get_type_id(&self) -> TypeId[src]
fn get_type_id(&self) -> TypeId🔬 This is a nightly-only experimental API. (get_type_id)
this method will likely be replaced by an associated static
Gets the TypeId of self. Read more
impl<C> StreamCipher for C where
C: SyncStreamCipher, [src]
impl<C> StreamCipher for C where
C: SyncStreamCipher, fn encrypt(&mut self, data: &mut [u8])[src]
fn encrypt(&mut self, data: &mut [u8])Encrypt data in place.
fn decrypt(&mut self, data: &mut [u8])[src]
fn decrypt(&mut self, data: &mut [u8])Decrypt data in place.
impl<T> Same for T
impl<T> Same for Ttype Output = T
Should always be Self