pub struct StreamCipherCoreWrapper<T>{ /* private fields */ }Expand description
Buffering wrapper around a StreamCipherCore implementation.
It handles data buffering and implements the slice-based traits.
Implementations§
Source§impl<T> StreamCipherCoreWrapper<T>
impl<T> StreamCipherCoreWrapper<T>
Sourcepub fn from_core(core: T) -> Self
pub fn from_core(core: T) -> Self
Initialize from a StreamCipherCore instance.
Sourcepub fn get_core(&self) -> &T
pub fn get_core(&self) -> &T
Get reference to the wrapped StreamCipherCore instance.
Trait Implementations§
Source§impl<T> Clone for StreamCipherCoreWrapper<T>
impl<T> Clone for StreamCipherCoreWrapper<T>
Source§impl<T> Debug for StreamCipherCoreWrapper<T>
impl<T> Debug for StreamCipherCoreWrapper<T>
Source§impl<T> IvSizeUser for StreamCipherCoreWrapper<T>
impl<T> IvSizeUser for StreamCipherCoreWrapper<T>
Source§impl<T> KeyInit for StreamCipherCoreWrapper<T>
impl<T> KeyInit for StreamCipherCoreWrapper<T>
Source§impl<T> KeyIvInit for StreamCipherCoreWrapper<T>
impl<T> KeyIvInit for StreamCipherCoreWrapper<T>
Source§impl<T> KeySizeUser for StreamCipherCoreWrapper<T>
impl<T> KeySizeUser for StreamCipherCoreWrapper<T>
Source§impl<T> StreamCipher for StreamCipherCoreWrapper<T>
impl<T> StreamCipher for StreamCipherCoreWrapper<T>
Source§fn check_remaining(&self, data_len: usize) -> Result<(), StreamCipherError>
fn check_remaining(&self, data_len: usize) -> Result<(), StreamCipherError>
Check that the cipher can generate a keystream with a length of
data_len bytes. Read moreSource§fn unchecked_apply_keystream_inout(&mut self, data: InOutBuf<'_, '_, u8>)
fn unchecked_apply_keystream_inout(&mut self, data: InOutBuf<'_, '_, u8>)
Apply keystream to
inout without checking for keystream repetition. Read moreSource§fn unchecked_write_keystream(&mut self, data: &mut [u8])
fn unchecked_write_keystream(&mut self, data: &mut [u8])
Apply keystream to
buf without checking for keystream repetition. Read moreSource§fn unchecked_apply_keystream(&mut self, buf: &mut [u8])
fn unchecked_apply_keystream(&mut self, buf: &mut [u8])
Apply keystream to data behind
buf without checking for keystream repetition. Read moreSource§fn unchecked_apply_keystream_b2b(
&mut self,
input: &[u8],
output: &mut [u8],
) -> Result<(), NotEqualError>
fn unchecked_apply_keystream_b2b( &mut self, input: &[u8], output: &mut [u8], ) -> Result<(), NotEqualError>
Apply keystream to data buffer-to-buffer without checking for keystream repetition. Read more
Source§fn try_apply_keystream_inout(
&mut self,
buf: InOutBuf<'_, '_, u8>,
) -> Result<(), StreamCipherError>
fn try_apply_keystream_inout( &mut self, buf: InOutBuf<'_, '_, u8>, ) -> Result<(), StreamCipherError>
Apply keystream to
inout data. Read moreSource§fn try_apply_keystream(
&mut self,
buf: &mut [u8],
) -> Result<(), StreamCipherError>
fn try_apply_keystream( &mut self, buf: &mut [u8], ) -> Result<(), StreamCipherError>
Apply keystream to data behind
buf. Read moreSource§fn try_apply_keystream_b2b(
&mut self,
input: &[u8],
output: &mut [u8],
) -> Result<(), StreamCipherError>
fn try_apply_keystream_b2b( &mut self, input: &[u8], output: &mut [u8], ) -> Result<(), StreamCipherError>
Apply keystream to data buffer-to-buffer. Read more
Source§fn try_write_keystream(
&mut self,
buf: &mut [u8],
) -> Result<(), StreamCipherError>
fn try_write_keystream( &mut self, buf: &mut [u8], ) -> Result<(), StreamCipherError>
Write keystream to
buf. Read moreSource§fn apply_keystream_inout(&mut self, buf: InOutBuf<'_, '_, u8>)
fn apply_keystream_inout(&mut self, buf: InOutBuf<'_, '_, u8>)
Apply keystream to
inout data. Read moreSource§fn apply_keystream(&mut self, buf: &mut [u8])
fn apply_keystream(&mut self, buf: &mut [u8])
Apply keystream to data in-place. Read more
Source§fn apply_keystream_b2b(&mut self, input: &[u8], output: &mut [u8])
fn apply_keystream_b2b(&mut self, input: &[u8], output: &mut [u8])
Apply keystream to data buffer-to-buffer. Read more
Source§fn write_keystream(&mut self, buf: &mut [u8])
fn write_keystream(&mut self, buf: &mut [u8])
Write keystream to
buf. Read moreSource§impl<T> StreamCipherSeek for StreamCipherCoreWrapper<T>
impl<T> StreamCipherSeek for StreamCipherCoreWrapper<T>
Source§fn try_current_pos<SN: SeekNum>(&self) -> Result<SN, OverflowError>
fn try_current_pos<SN: SeekNum>(&self) -> Result<SN, OverflowError>
Try to get current keystream position in bytes. Read more
Source§fn try_seek<SN: SeekNum>(
&mut self,
new_pos: SN,
) -> Result<(), StreamCipherError>
fn try_seek<SN: SeekNum>( &mut self, new_pos: SN, ) -> Result<(), StreamCipherError>
Try to seek to the provided position in bytes. Read more
Source§fn current_pos<T: SeekNum>(&self) -> T
fn current_pos<T: SeekNum>(&self) -> T
Get current keystream position in bytes. Read more
Auto Trait Implementations§
impl<T> Freeze for StreamCipherCoreWrapper<T>where
<T as BlockSizeUser>::BlockSize: Sized,
T: Freeze,
<<T as BlockSizeUser>::BlockSize as ArraySize>::ArrayType<u8>: Freeze,
impl<T> RefUnwindSafe for StreamCipherCoreWrapper<T>where
<T as BlockSizeUser>::BlockSize: Sized,
T: RefUnwindSafe,
<<T as BlockSizeUser>::BlockSize as ArraySize>::ArrayType<u8>: RefUnwindSafe,
impl<T> Send for StreamCipherCoreWrapper<T>
impl<T> Sync for StreamCipherCoreWrapper<T>
impl<T> Unpin for StreamCipherCoreWrapper<T>where
<T as BlockSizeUser>::BlockSize: Sized,
T: Unpin,
<<T as BlockSizeUser>::BlockSize as ArraySize>::ArrayType<u8>: Unpin,
impl<T> UnwindSafe for StreamCipherCoreWrapper<T>where
<T as BlockSizeUser>::BlockSize: Sized,
T: UnwindSafe,
<<T as BlockSizeUser>::BlockSize as ArraySize>::ArrayType<u8>: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more