Backend

Struct Backend 

Source
pub(crate) struct Backend<'a, R: Unsigned>(pub(crate) &'a mut ChaChaCore<R>);

Tuple Fields§

§0: &'a mut ChaChaCore<R>

Trait Implementations§

Source§

impl<'a, R: Unsigned> BlockSizeUser for Backend<'a, R>

Source§

type BlockSize = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>

Size of the block in bytes.
Source§

fn block_size() -> usize

Return block size in bytes.
Source§

impl<'a, R: Unsigned> ParBlocksSizeUser for Backend<'a, R>

Source§

type ParBlocksSize = UInt<UTerm, B1>

Number of blocks which can be processed in parallel.
Source§

impl<'a, R: Unsigned> StreamBackend for Backend<'a, R>

Source§

fn gen_ks_block(&mut self, block: &mut GenericArray<u8, U64>)

Generate keystream block.
Source§

fn gen_par_ks_blocks( &mut self, blocks: &mut GenericArray<GenericArray<u8, Self::BlockSize>, Self::ParBlocksSize>, )

Generate keystream blocks in parallel.
Source§

fn gen_tail_blocks(&mut self, blocks: &mut [GenericArray<u8, Self::BlockSize>])

Generate keystream blocks. Length of the buffer MUST be smaller than Self::ParBlocksSize.

Auto Trait Implementations§

§

impl<'a, R> Freeze for Backend<'a, R>

§

impl<'a, R> RefUnwindSafe for Backend<'a, R>
where R: RefUnwindSafe,

§

impl<'a, R> Send for Backend<'a, R>
where R: Send,

§

impl<'a, R> Sync for Backend<'a, R>
where R: Sync,

§

impl<'a, R> Unpin for Backend<'a, R>

§

impl<'a, R> !UnwindSafe for Backend<'a, R>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.