Struct CoreWrapper

struct CoreWrapper<T> { ... }
where
    T: BufferKindUser,
    <T as >::BlockSize: IsLess<crypto_common::typenum::U256>,
    crypto_common::typenum::Le<<T as >::BlockSize, crypto_common::typenum::U256>: NonZero

Wrapper around BufferKindUser.

It handles data buffering and implements the slice-based traits.

Implementations

impl<T> CoreWrapper<T>

fn from_core(core: T) -> Self

Create new wrapper from core.

fn decompose(self: Self) -> (T, Buffer<T>)

Decompose wrapper into inner parts.

impl<D> Digest for CoreWrapper<T>

fn new() -> Self
fn new_with_prefix<impl AsRef<[u8]>: AsRef<[u8]>>(data: impl AsRef<[u8]>) -> Self
where
    Self: Default + Sized
fn update<impl AsRef<[u8]>: AsRef<[u8]>>(self: &mut Self, data: impl AsRef<[u8]>)
fn chain_update<impl AsRef<[u8]>: AsRef<[u8]>>(self: Self, data: impl AsRef<[u8]>) -> Self
fn finalize(self: Self) -> Output<Self>
fn finalize_into(self: Self, out: &mut Output<Self>)
fn finalize_reset(self: &mut Self) -> Output<Self>
where
    Self: FixedOutputReset
fn finalize_into_reset(self: &mut Self, out: &mut Output<Self>)
where
    Self: FixedOutputReset
fn reset(self: &mut Self)
where
    Self: Reset
fn output_size() -> usize
fn digest<impl AsRef<[u8]>: AsRef<[u8]>>(data: impl AsRef<[u8]>) -> Output<Self>

impl<D> DynDigest for CoreWrapper<T>

fn update(self: &mut Self, data: &[u8])
fn finalize_reset(self: &mut Self) -> Box<[u8]>
fn finalize(self: Box<Self>) -> Box<[u8]>
fn finalize_into(self: Self, buf: &mut [u8]) -> Result<(), InvalidBufferSize>
fn finalize_into_reset(self: &mut Self, buf: &mut [u8]) -> Result<(), InvalidBufferSize>
fn reset(self: &mut Self)
fn output_size(self: &Self) -> usize
fn box_clone(self: &Self) -> Box<dyn DynDigest>

impl<T> Any for CoreWrapper<T>

fn type_id(self: &Self) -> TypeId

impl<T> BlockSizeUser for CoreWrapper<T>

impl<T> Borrow for CoreWrapper<T>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for CoreWrapper<T>

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

impl<T> Clone for CoreWrapper<T>

fn clone(self: &Self) -> CoreWrapper<T>

impl<T> CloneToUninit for CoreWrapper<T>

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> CoreProxy for CoreWrapper<T>

impl<T> Debug for CoreWrapper<T>

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result<(), Error>

impl<T> Default for CoreWrapper<T>

fn default() -> CoreWrapper<T>

impl<T> ExtendableOutput for CoreWrapper<T>

fn finalize_xof(self: Self) -> <Self as >::Reader

impl<T> ExtendableOutputReset for CoreWrapper<T>

fn finalize_xof_reset(self: &mut Self) -> <Self as >::Reader

impl<T> FixedOutput for CoreWrapper<T>

fn finalize_into(self: Self, out: &mut Output<Self>)

impl<T> FixedOutputReset for CoreWrapper<T>

fn finalize_into_reset(self: &mut Self, out: &mut Output<Self>)

impl<T> Freeze for CoreWrapper<T>

impl<T> From for CoreWrapper<T>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> HashMarker for CoreWrapper<T>

impl<T> KeyInit for CoreWrapper<T>

fn new(key: &Key<Self>) -> Self
fn new_from_slice(key: &[u8]) -> Result<Self, InvalidLength>

impl<T> KeySizeUser for CoreWrapper<T>

impl<T> Mac for CoreWrapper<T>

fn new(key: &Key<Self>) -> Self
where
    Self: KeyInit
fn new_from_slice(key: &[u8]) -> Result<Self, InvalidLength>
where
    Self: KeyInit
fn update(self: &mut Self, data: &[u8])
fn chain_update<impl AsRef<[u8]>: AsRef<[u8]>>(self: Self, data: impl AsRef<[u8]>) -> Self
fn finalize(self: Self) -> CtOutput<Self>
fn finalize_reset(self: &mut Self) -> CtOutput<Self>
where
    Self: FixedOutputReset
fn reset(self: &mut Self)
where
    Self: Reset
fn verify(self: Self, tag: &Output<Self>) -> Result<(), MacError>
fn verify_reset(self: &mut Self, tag: &Output<Self>) -> Result<(), MacError>
where
    Self: FixedOutputReset
fn verify_slice(self: Self, tag: &[u8]) -> Result<(), MacError>
fn verify_slice_reset(self: &mut Self, tag: &[u8]) -> Result<(), MacError>
where
    Self: FixedOutputReset
fn verify_truncated_left(self: Self, tag: &[u8]) -> Result<(), MacError>
fn verify_truncated_right(self: Self, tag: &[u8]) -> Result<(), MacError>

impl<T> MacMarker for CoreWrapper<T>

impl<T> OutputSizeUser for CoreWrapper<T>

impl<T> RefUnwindSafe for CoreWrapper<T>

impl<T> Reset for CoreWrapper<T>

fn reset(self: &mut Self)

impl<T> Same for CoreWrapper<T>

impl<T> Send for CoreWrapper<T>

impl<T> Sync for CoreWrapper<T>

impl<T> ToOwned for CoreWrapper<T>

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T> Unpin for CoreWrapper<T>

impl<T> UnsafeUnpin for CoreWrapper<T>

impl<T> UnwindSafe for CoreWrapper<T>

impl<T> Update for CoreWrapper<T>

fn update(self: &mut Self, input: &[u8])

impl<T> Write for CoreWrapper<T>

fn write(self: &mut Self, buf: &[u8]) -> Result<usize>
fn flush(self: &mut Self) -> Result<()>

impl<T, U> Into for CoreWrapper<T>

fn into(self: Self) -> U

Calls U::from(self).

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

impl<T, U> TryFrom for CoreWrapper<T>

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

impl<T, U> TryInto for CoreWrapper<T>

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