pub struct XChaChaCore<R: Rounds>(ChaChaCore<R, Ietf>);Expand description
The XChaCha core function.
Tuple Fields§
§0: ChaChaCore<R, Ietf>Trait Implementations§
Source§impl<R: Rounds> BlockSizeUser for XChaChaCore<R>
impl<R: Rounds> BlockSizeUser for XChaChaCore<R>
Source§impl<R: Rounds> IvSizeUser for XChaChaCore<R>
impl<R: Rounds> IvSizeUser for XChaChaCore<R>
Source§impl<R: Rounds> KeyIvInit for XChaChaCore<R>
impl<R: Rounds> KeyIvInit for XChaChaCore<R>
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. Read more
Source§fn generate_key<R>(rng: &mut R) -> Array<u8, Self::KeySize>where
R: CryptoRng,
fn generate_key<R>(rng: &mut R) -> Array<u8, Self::KeySize>where
R: CryptoRng,
👎Deprecated since 0.2.0: use the
Generate trait impl on Key insteadSource§impl<R: Rounds> KeySizeUser for XChaChaCore<R>
impl<R: Rounds> KeySizeUser for XChaChaCore<R>
Source§impl<R: Rounds> StreamCipherCore for XChaChaCore<R>
impl<R: Rounds> StreamCipherCore for XChaChaCore<R>
Source§fn remaining_blocks(&self) -> Option<usize>
fn remaining_blocks(&self) -> Option<usize>
Return number of remaining blocks before the cipher wraps around. Read more
Source§fn process_with_backend(
&mut self,
f: impl StreamCipherClosure<BlockSize = Self::BlockSize>,
)
fn process_with_backend( &mut self, f: impl StreamCipherClosure<BlockSize = Self::BlockSize>, )
Process data using backend provided to the rank-2 closure.
Source§fn write_keystream_block(&mut self, block: &mut Array<u8, Self::BlockSize>)
fn write_keystream_block(&mut self, block: &mut Array<u8, Self::BlockSize>)
Write keystream block. Read more
Source§fn write_keystream_blocks(&mut self, blocks: &mut [Array<u8, Self::BlockSize>])
fn write_keystream_blocks(&mut self, blocks: &mut [Array<u8, Self::BlockSize>])
Write keystream blocks. Read more
Source§fn apply_keystream_block_inout(
&mut self,
block: InOut<'_, '_, Array<u8, Self::BlockSize>>,
)
fn apply_keystream_block_inout( &mut self, block: InOut<'_, '_, Array<u8, Self::BlockSize>>, )
Apply keystream block. Read more
Source§fn apply_keystream_blocks(&mut self, blocks: &mut [Array<u8, Self::BlockSize>])
fn apply_keystream_blocks(&mut self, blocks: &mut [Array<u8, Self::BlockSize>])
Apply keystream blocks. Read more
Source§fn apply_keystream_blocks_inout(
&mut self,
blocks: InOutBuf<'_, '_, Array<u8, Self::BlockSize>>,
)
fn apply_keystream_blocks_inout( &mut self, blocks: InOutBuf<'_, '_, Array<u8, Self::BlockSize>>, )
Apply keystream blocks. Read more
Source§fn try_apply_keystream_partial(
self,
buf: InOutBuf<'_, '_, u8>,
) -> Result<(), StreamCipherError>
fn try_apply_keystream_partial( self, buf: InOutBuf<'_, '_, u8>, ) -> Result<(), StreamCipherError>
Try to apply keystream to data not divided into blocks. Read more
Source§impl<R: Rounds> StreamCipherSeekCore for XChaChaCore<R>
impl<R: Rounds> StreamCipherSeekCore for XChaChaCore<R>
impl<R: Rounds> ZeroizeOnDrop for XChaChaCore<R>
Available on crate feature
zeroize only.Auto Trait Implementations§
impl<R> Freeze for XChaChaCore<R>
impl<R> RefUnwindSafe for XChaChaCore<R>where
R: RefUnwindSafe,
impl<R> Send for XChaChaCore<R>where
R: Send,
impl<R> Sync for XChaChaCore<R>where
R: Sync,
impl<R> Unpin for XChaChaCore<R>where
R: Unpin,
impl<R> UnsafeUnpin for XChaChaCore<R>
impl<R> UnwindSafe for XChaChaCore<R>where
R: 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