pub struct CoreWrapper<T>{ /* private fields */ }
Available on crate feature
core-api
only.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>
impl<T> BlockSizeUser for CoreWrapper<T>
Source§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>
impl<T> Clone for CoreWrapper<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T> CoreProxy for CoreWrapper<T>
impl<T> CoreProxy for CoreWrapper<T>
Source§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>
impl<T> Default for CoreWrapper<T>
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,
Source§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>
impl<T> FixedOutput for CoreWrapper<T>
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>
impl<T> FixedOutputReset for CoreWrapper<T>
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>
impl<T> KeyInit for CoreWrapper<T>
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>
impl<T> KeySizeUser for CoreWrapper<T>
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,
Source§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>
impl<T> Reset for CoreWrapper<T>
Source§impl<T> Update for CoreWrapper<T>
impl<T> Update for CoreWrapper<T>
Source§impl<T> Write for CoreWrapper<T>
Available on crate feature std
only.
impl<T> Write for CoreWrapper<T>
Available on crate feature
std
only.Source§fn write(&mut self, buf: &[u8]) -> Result<usize>
fn write(&mut self, buf: &[u8]) -> Result<usize>
Writes a buffer into this writer, returning how many bytes were written. Read more
Source§fn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
Flushes 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
impl<T> HashMarker for CoreWrapper<T>
Auto Trait Implementations§
impl<T> Freeze for CoreWrapper<T>
impl<T> RefUnwindSafe for CoreWrapper<T>where
T: RefUnwindSafe,
<<T as BlockSizeUser>::BlockSize as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
<T as BufferKindUser>::BufferKind: RefUnwindSafe,
impl<T> Send for CoreWrapper<T>
impl<T> Sync for CoreWrapper<T>
impl<T> Unpin for CoreWrapper<T>where
T: Unpin,
<<T as BlockSizeUser>::BlockSize as ArrayLength<u8>>::ArrayType: Unpin,
<T as BufferKindUser>::BufferKind: Unpin,
impl<T> UnwindSafe for CoreWrapper<T>where
T: UnwindSafe,
<<T as BlockSizeUser>::BlockSize as ArrayLength<u8>>::ArrayType: UnwindSafe,
<T as BufferKindUser>::BufferKind: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<D> Digest for D
impl<D> Digest for D
Source§fn new_with_prefix(data: impl AsRef<[u8]>) -> Dwhere
D: Default,
fn new_with_prefix(data: impl AsRef<[u8]>) -> Dwhere
D: Default,
Create new hasher instance which has processed the provided data.
Source§fn chain_update(self, data: impl AsRef<[u8]>) -> D
fn chain_update(self, data: impl AsRef<[u8]>) -> D
Process input data in a chained manner.
Source§fn finalize(self) -> GenericArray<u8, <D as OutputSizeUser>::OutputSize>
fn finalize(self) -> GenericArray<u8, <D as OutputSizeUser>::OutputSize>
Retrieve result and consume hasher instance.
Source§fn finalize_into(
self,
out: &mut GenericArray<u8, <D as OutputSizeUser>::OutputSize>,
)
fn finalize_into( self, out: &mut GenericArray<u8, <D as OutputSizeUser>::OutputSize>, )
Write result into provided array and consume the hasher instance.
Source§fn finalize_reset(
&mut self,
) -> GenericArray<u8, <D as OutputSizeUser>::OutputSize>where
D: FixedOutputReset,
fn finalize_reset(
&mut self,
) -> GenericArray<u8, <D as OutputSizeUser>::OutputSize>where
D: FixedOutputReset,
Retrieve result and reset hasher instance.
Source§fn finalize_into_reset(
&mut self,
out: &mut GenericArray<u8, <D as OutputSizeUser>::OutputSize>,
)where
D: FixedOutputReset,
fn finalize_into_reset(
&mut self,
out: &mut GenericArray<u8, <D as OutputSizeUser>::OutputSize>,
)where
D: FixedOutputReset,
Write result into provided array and reset the hasher instance.
Source§fn output_size() -> usize
fn output_size() -> usize
Get output size of the hasher
Source§fn digest(
data: impl AsRef<[u8]>,
) -> GenericArray<u8, <D as OutputSizeUser>::OutputSize>
fn digest( data: impl AsRef<[u8]>, ) -> GenericArray<u8, <D as OutputSizeUser>::OutputSize>
Compute hash of
data
.Source§impl<D> DynDigest for D
impl<D> DynDigest for D
Source§fn finalize_reset(&mut self) -> Box<[u8]>
fn finalize_reset(&mut self) -> Box<[u8]>
Available on crate feature
alloc
only.Retrieve result and reset hasher instance
Source§fn finalize(self: Box<D>) -> Box<[u8]>
fn finalize(self: Box<D>) -> Box<[u8]>
Available on crate feature
alloc
only.Retrieve result and consume boxed hasher instance
Source§fn finalize_into(self, buf: &mut [u8]) -> Result<(), InvalidBufferSize>
fn finalize_into(self, buf: &mut [u8]) -> Result<(), InvalidBufferSize>
Write result into provided array and consume the hasher instance. Read more
Source§fn finalize_into_reset(
&mut self,
buf: &mut [u8],
) -> Result<(), InvalidBufferSize>
fn finalize_into_reset( &mut self, buf: &mut [u8], ) -> Result<(), InvalidBufferSize>
Write result into provided array and reset the hasher instance. Read more
Source§fn output_size(&self) -> usize
fn output_size(&self) -> usize
Get output size of the hasher
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.