Struct cipher::StreamCipherCoreWrapper
source · pub struct StreamCipherCoreWrapper<T: StreamCipherCore> { /* private fields */ }Expand description
Buffering wrapper around a StreamCipherCore implementation.
It handles data buffering and implements the slice-based traits.
Implementations§
source§impl<T: StreamCipherCore> StreamCipherCoreWrapper<T>
impl<T: StreamCipherCore> StreamCipherCoreWrapper<T>
Trait Implementations§
source§impl<T: StreamCipherCore + Clone> Clone for StreamCipherCoreWrapper<T>
impl<T: StreamCipherCore + Clone> Clone for StreamCipherCoreWrapper<T>
source§impl<T: StreamCipherCore + Debug> Debug for StreamCipherCoreWrapper<T>
impl<T: StreamCipherCore + Debug> Debug for StreamCipherCoreWrapper<T>
source§impl<T: StreamCipherCore + Default> Default for StreamCipherCoreWrapper<T>
impl<T: StreamCipherCore + Default> Default for StreamCipherCoreWrapper<T>
source§impl<T: StreamCipherCore> Drop for StreamCipherCoreWrapper<T>
Available on crate feature zeroize only.
impl<T: StreamCipherCore> Drop for StreamCipherCoreWrapper<T>
Available on crate feature
zeroize only.source§impl<T: IvSizeUser + StreamCipherCore> IvSizeUser for StreamCipherCoreWrapper<T>
impl<T: IvSizeUser + StreamCipherCore> IvSizeUser for StreamCipherCoreWrapper<T>
source§impl<T: KeyInit + StreamCipherCore> KeyInit for StreamCipherCoreWrapper<T>
impl<T: KeyInit + StreamCipherCore> KeyInit for StreamCipherCoreWrapper<T>
source§fn new_from_slice(key: &[u8]) -> Result<Self, InvalidLength>
fn new_from_slice(key: &[u8]) -> Result<Self, InvalidLength>
Create new value from variable size key.
source§fn generate_key_with_rng(
rng: &mut impl CryptoRngCore,
) -> Result<Array<u8, Self::KeySize>, Error>
fn generate_key_with_rng( rng: &mut impl CryptoRngCore, ) -> Result<Array<u8, Self::KeySize>, Error>
Available on crate feature
rand_core only.Generate random key using the provided
CryptoRngCore.source§impl<T: KeyIvInit + StreamCipherCore> KeyIvInit for StreamCipherCoreWrapper<T>
impl<T: KeyIvInit + StreamCipherCore> KeyIvInit for StreamCipherCoreWrapper<T>
source§fn new(key: &Key<Self>, iv: &Iv<Self>) -> Self
fn new(key: &Key<Self>, iv: &Iv<Self>) -> Self
Create new value from fixed length key and nonce.
source§fn new_from_slices(key: &[u8], iv: &[u8]) -> Result<Self, InvalidLength>
fn new_from_slices(key: &[u8], iv: &[u8]) -> Result<Self, InvalidLength>
Create new value from variable length key and nonce.
source§fn generate_key_with_rng(
rng: &mut impl CryptoRngCore,
) -> Result<Array<u8, Self::KeySize>, Error>
fn generate_key_with_rng( rng: &mut impl CryptoRngCore, ) -> Result<Array<u8, Self::KeySize>, Error>
Available on crate feature
rand_core only.Generate random key using the provided
CryptoRngCore.source§fn generate_iv_with_rng(
rng: &mut impl CryptoRngCore,
) -> Result<Array<u8, Self::IvSize>, Error>
fn generate_iv_with_rng( rng: &mut impl CryptoRngCore, ) -> Result<Array<u8, Self::IvSize>, Error>
Available on crate feature
rand_core only.Generate random IV using the provided
CryptoRngCore.source§fn generate_key_iv_with_rng(
rng: &mut impl CryptoRngCore,
) -> Result<(Array<u8, Self::KeySize>, Array<u8, Self::IvSize>), Error>
fn generate_key_iv_with_rng( rng: &mut impl CryptoRngCore, ) -> Result<(Array<u8, Self::KeySize>, Array<u8, Self::IvSize>), Error>
Available on crate feature
rand_core only.Generate random key and IV using the provided
CryptoRngCore.source§impl<T: KeySizeUser + StreamCipherCore> KeySizeUser for StreamCipherCoreWrapper<T>
impl<T: KeySizeUser + StreamCipherCore> KeySizeUser for StreamCipherCoreWrapper<T>
source§impl<T: StreamCipherCore> StreamCipher for StreamCipherCoreWrapper<T>
impl<T: StreamCipherCore> StreamCipher for StreamCipherCoreWrapper<T>
source§fn try_apply_keystream_inout(
&mut self,
data: InOutBuf<'_, '_, u8>,
) -> Result<(), StreamCipherError>
fn try_apply_keystream_inout( &mut self, data: 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 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],
) -> Result<(), StreamCipherError>
fn apply_keystream_b2b( &mut self, input: &[u8], output: &mut [u8], ) -> Result<(), StreamCipherError>
Apply keystream to data buffer-to-buffer. Read more
source§impl<T: StreamCipherSeekCore> StreamCipherSeek for StreamCipherCoreWrapper<T>
impl<T: StreamCipherSeekCore> 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 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 given position Read more
source§fn current_pos<T: SeekNum>(&self) -> T
fn current_pos<T: SeekNum>(&self) -> T
Get current keystream position Read more
impl<T: StreamCipherCore + ZeroizeOnDrop> ZeroizeOnDrop for StreamCipherCoreWrapper<T>
Available on crate feature
zeroize only.Auto Trait Implementations§
impl<T> Freeze for StreamCipherCoreWrapper<T>
impl<T> RefUnwindSafe for StreamCipherCoreWrapper<T>where
T: RefUnwindSafe,
<<T as BlockSizeUser>::BlockSize as ArraySize>::ArrayType<u8>: RefUnwindSafe,
impl<T> Send for StreamCipherCoreWrapper<T>where
T: Send,
impl<T> Sync for StreamCipherCoreWrapper<T>where
T: Sync,
impl<T> Unpin for StreamCipherCoreWrapper<T>
impl<T> UnwindSafe for StreamCipherCoreWrapper<T>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)