Skip to main content

ClosureWrapper

Struct ClosureWrapper 

Source
struct ClosureWrapper<TS: ArraySize, BS: ArraySize, F> {
    f: F,
    _pd: PhantomData<(TS, BS)>,
}
Expand description

Wrapper around non-tweakble block cipher closures which implements the tweakable block cipher closure traits using zero tweak.

Fields§

§f: F§_pd: PhantomData<(TS, BS)>

Trait Implementations§

Source§

impl<TS: ArraySize, BS: ArraySize, F> BlockSizeUser for ClosureWrapper<TS, BS, F>

Source§

type BlockSize = BS

Size of the block in bytes.
Source§

fn block_size() -> usize

Return block size in bytes.
Source§

impl<TS: ArraySize, BS: ArraySize, F> TweakBlockCipherDecClosure for ClosureWrapper<TS, BS, F>
where F: BlockCipherDecClosure<BlockSize = BS>,

Source§

fn call<B: TweakBlockCipherDecBackend<BlockSize = BS, TweakSize = TS>>( self, backend: &B, )

Execute closure with the provided block cipher backend.
Source§

impl<TS: ArraySize, BS: ArraySize, F> TweakBlockCipherEncClosure for ClosureWrapper<TS, BS, F>
where F: BlockCipherEncClosure<BlockSize = BS>,

Source§

fn call<B: TweakBlockCipherEncBackend<BlockSize = BS, TweakSize = TS>>( self, backend: &B, )

Execute closure with the provided block cipher backend.
Source§

impl<TS: ArraySize, BS: ArraySize, F> TweakSizeUser for ClosureWrapper<TS, BS, F>

Source§

type TweakSize = TS

Size of the tweak in bytes.

Auto Trait Implementations§

§

impl<TS, BS, F> Freeze for ClosureWrapper<TS, BS, F>
where F: Freeze,

§

impl<TS, BS, F> RefUnwindSafe for ClosureWrapper<TS, BS, F>

§

impl<TS, BS, F> Send for ClosureWrapper<TS, BS, F>
where F: Send, TS: Send, BS: Send,

§

impl<TS, BS, F> Sync for ClosureWrapper<TS, BS, F>
where F: Sync, TS: Sync, BS: Sync,

§

impl<TS, BS, F> Unpin for ClosureWrapper<TS, BS, F>
where F: Unpin, TS: Unpin, BS: Unpin,

§

impl<TS, BS, F> UnsafeUnpin for ClosureWrapper<TS, BS, F>
where F: UnsafeUnpin,

§

impl<TS, BS, F> UnwindSafe for ClosureWrapper<TS, BS, F>
where F: UnwindSafe, TS: UnwindSafe, BS: UnwindSafe,

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.