Struct digest::core_api::CoreWrapper
source · pub struct CoreWrapper<T>where
T: BufferKindUser,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,{ /* private fields */ }
Expand description
Wrapper around BufferKindUser
.
It handles data buffering and implements the slice-based traits.
Implementations§
Trait Implementations§
source§impl<T> BlockSizeUser for CoreWrapper<T>where
T: BufferKindUser + HashMarker,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
impl<T> BlockSizeUser for CoreWrapper<T>where
T: BufferKindUser + HashMarker,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
§type BlockSize = <T as BlockSizeUser>::BlockSize
type BlockSize = <T as BlockSizeUser>::BlockSize
Size of the block in bytes.
source§fn block_size() -> usize
fn block_size() -> usize
Return block size in bytes.
source§impl<T> Clone for CoreWrapper<T>where
T: BufferKindUser + Clone,
T::BlockSize: IsLess<U256> + Clone,
Le<T::BlockSize, U256>: NonZero,
T::BufferKind: Clone,
impl<T> Clone for CoreWrapper<T>where
T: BufferKindUser + Clone,
T::BlockSize: IsLess<U256> + Clone,
Le<T::BlockSize, U256>: NonZero,
T::BufferKind: Clone,
source§impl<T> CoreProxy for CoreWrapper<T>where
T: BufferKindUser,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
impl<T> CoreProxy for CoreWrapper<T>where
T: BufferKindUser,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
§type Core = T
type Core = T
Type wrapped by
CoreWrapper
.source§impl<T> Debug for CoreWrapper<T>where
T: BufferKindUser + AlgorithmName,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
impl<T> Debug for CoreWrapper<T>where
T: BufferKindUser + AlgorithmName,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
source§impl<T> Default for CoreWrapper<T>where
T: BufferKindUser + Default,
T::BlockSize: IsLess<U256> + Default,
Le<T::BlockSize, U256>: NonZero,
T::BufferKind: Default,
impl<T> Default for CoreWrapper<T>where
T: BufferKindUser + Default,
T::BlockSize: IsLess<U256> + Default,
Le<T::BlockSize, U256>: NonZero,
T::BufferKind: Default,
source§impl<T> ExtendableOutput for CoreWrapper<T>where
T: ExtendableOutputCore,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
<T::ReaderCore as BlockSizeUser>::BlockSize: IsLess<U256>,
Le<<T::ReaderCore as BlockSizeUser>::BlockSize, U256>: NonZero,
impl<T> ExtendableOutput for CoreWrapper<T>where
T: ExtendableOutputCore,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
<T::ReaderCore as BlockSizeUser>::BlockSize: IsLess<U256>,
Le<<T::ReaderCore as BlockSizeUser>::BlockSize, U256>: NonZero,
§type Reader = XofReaderCoreWrapper<<T as ExtendableOutputCore>::ReaderCore>
type Reader = XofReaderCoreWrapper<<T as ExtendableOutputCore>::ReaderCore>
Reader
source§fn finalize_xof(self) -> Self::Reader
fn finalize_xof(self) -> Self::Reader
Retrieve XOF reader and consume hasher instance.
source§fn finalize_xof_into(self, out: &mut [u8])
fn finalize_xof_into(self, out: &mut [u8])
Finalize XOF and write result into
out
.source§impl<T> ExtendableOutputReset for CoreWrapper<T>where
T: ExtendableOutputCore + Reset,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
<T::ReaderCore as BlockSizeUser>::BlockSize: IsLess<U256>,
Le<<T::ReaderCore as BlockSizeUser>::BlockSize, U256>: NonZero,
impl<T> ExtendableOutputReset for CoreWrapper<T>where
T: ExtendableOutputCore + Reset,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
<T::ReaderCore as BlockSizeUser>::BlockSize: IsLess<U256>,
Le<<T::ReaderCore as BlockSizeUser>::BlockSize, U256>: NonZero,
source§fn finalize_xof_reset(&mut self) -> Self::Reader
fn finalize_xof_reset(&mut self) -> Self::Reader
Retrieve XOF reader and reset hasher instance state.
source§fn finalize_xof_reset_into(&mut self, out: &mut [u8])
fn finalize_xof_reset_into(&mut self, out: &mut [u8])
Finalize XOF, write result into
out
, and reset the hasher state.source§impl<T> FixedOutput for CoreWrapper<T>where
T: FixedOutputCore,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
impl<T> FixedOutput for CoreWrapper<T>where
T: FixedOutputCore,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
source§fn finalize_into(self, out: &mut Output<Self>)
fn finalize_into(self, out: &mut Output<Self>)
Consume value and write result into provided array.
source§fn finalize_fixed(self) -> Output<Self>
fn finalize_fixed(self) -> Output<Self>
Retrieve result and consume the hasher instance.
source§impl<T> FixedOutputReset for CoreWrapper<T>where
T: FixedOutputCore + Reset,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
impl<T> FixedOutputReset for CoreWrapper<T>where
T: FixedOutputCore + Reset,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
source§fn finalize_into_reset(&mut self, out: &mut Output<Self>)
fn finalize_into_reset(&mut self, out: &mut Output<Self>)
Write result into provided array and reset the hasher state.
source§fn finalize_fixed_reset(&mut self) -> Output<Self>
fn finalize_fixed_reset(&mut self) -> Output<Self>
Retrieve result and reset the hasher state.
source§impl<T> KeyInit for CoreWrapper<T>where
T: BufferKindUser + KeyInit,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
impl<T> KeyInit for CoreWrapper<T>where
T: BufferKindUser + KeyInit,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
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§impl<T> KeySizeUser for CoreWrapper<T>where
T: BufferKindUser + KeySizeUser,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
impl<T> KeySizeUser for CoreWrapper<T>where
T: BufferKindUser + KeySizeUser,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
source§impl<T> OutputSizeUser for CoreWrapper<T>where
T: BufferKindUser + OutputSizeUser,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
impl<T> OutputSizeUser for CoreWrapper<T>where
T: BufferKindUser + OutputSizeUser,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
§type OutputSize = <T as OutputSizeUser>::OutputSize
type OutputSize = <T as OutputSizeUser>::OutputSize
Size of the output in bytes.
source§fn output_size() -> usize
fn output_size() -> usize
Return output size in bytes.
source§impl<T> Reset for CoreWrapper<T>where
T: BufferKindUser + Reset,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
impl<T> Reset for CoreWrapper<T>where
T: BufferKindUser + Reset,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
source§impl<T> Update for CoreWrapper<T>where
T: BufferKindUser + UpdateCore,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
impl<T> Update for CoreWrapper<T>where
T: BufferKindUser + UpdateCore,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
source§impl<T> Write for CoreWrapper<T>where
T: BufferKindUser + UpdateCore,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
impl<T> Write for CoreWrapper<T>where
T: BufferKindUser + UpdateCore,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
source§fn write(&mut self, buf: &[u8]) -> Result<usize>
fn write(&mut self, buf: &[u8]) -> Result<usize>
Write a buffer into this writer, returning how many bytes were written. Read more
source§fn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
Flush this output stream, ensuring that all intermediately buffered
contents reach their destination. Read more
source§fn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
🔬This is a nightly-only experimental API. (
can_vector
)1.0.0 · source§fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
Attempts to write an entire buffer into this writer. Read more
source§fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
🔬This is a nightly-only experimental API. (
write_all_vectored
)Attempts to write multiple buffers into this writer. Read more