pub struct RtVariableCoreWrapper<T>where
T: VariableOutputCore + UpdateCore,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,{ /* private fields */ }
Available on crate feature
core-api
only.Expand description
Wrapper around VariableOutputCore
which selects output size
at run time.
Trait Implementations§
Source§impl<T> Clone for RtVariableCoreWrapper<T>where
T: VariableOutputCore + UpdateCore + Clone,
T::BlockSize: IsLess<U256> + Clone,
Le<T::BlockSize, U256>: NonZero,
T::BufferKind: Clone,
impl<T> Clone for RtVariableCoreWrapper<T>where
T: VariableOutputCore + UpdateCore + Clone,
T::BlockSize: IsLess<U256> + Clone,
Le<T::BlockSize, U256>: NonZero,
T::BufferKind: Clone,
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> Debug for RtVariableCoreWrapper<T>where
T: VariableOutputCore + UpdateCore + AlgorithmName,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
impl<T> Debug for RtVariableCoreWrapper<T>where
T: VariableOutputCore + UpdateCore + AlgorithmName,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
Source§impl<T> Reset for RtVariableCoreWrapper<T>where
T: VariableOutputCore + UpdateCore + Reset,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
impl<T> Reset for RtVariableCoreWrapper<T>where
T: VariableOutputCore + UpdateCore + Reset,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
Source§impl<T> Update for RtVariableCoreWrapper<T>where
T: VariableOutputCore + UpdateCore,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
impl<T> Update for RtVariableCoreWrapper<T>where
T: VariableOutputCore + UpdateCore,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
Source§impl<T> VariableOutput for RtVariableCoreWrapper<T>where
T: VariableOutputCore + UpdateCore,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
impl<T> VariableOutput for RtVariableCoreWrapper<T>where
T: VariableOutputCore + UpdateCore,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
Source§const MAX_OUTPUT_SIZE: usize = <T::OutputSize>::USIZE
const MAX_OUTPUT_SIZE: usize = <T::OutputSize>::USIZE
Maximum size of output hash.
Source§fn new(output_size: usize) -> Result<Self, InvalidOutputSize>
fn new(output_size: usize) -> Result<Self, InvalidOutputSize>
Create new hasher instance with the given output size. Read more
Source§fn output_size(&self) -> usize
fn output_size(&self) -> usize
Get output size of the hasher instance provided to the
new
methodSource§fn finalize_variable(self, out: &mut [u8]) -> Result<(), InvalidBufferSize>
fn finalize_variable(self, out: &mut [u8]) -> Result<(), InvalidBufferSize>
Write result into the output buffer. Read more
Source§fn digest_variable(
input: impl AsRef<[u8]>,
output: &mut [u8],
) -> Result<(), InvalidOutputSize>
fn digest_variable( input: impl AsRef<[u8]>, output: &mut [u8], ) -> Result<(), InvalidOutputSize>
Source§impl<T> VariableOutputReset for RtVariableCoreWrapper<T>where
T: VariableOutputCore + UpdateCore + Reset,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
impl<T> VariableOutputReset for RtVariableCoreWrapper<T>where
T: VariableOutputCore + UpdateCore + Reset,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
Source§fn finalize_variable_reset(
&mut self,
out: &mut [u8],
) -> Result<(), InvalidBufferSize>
fn finalize_variable_reset( &mut self, out: &mut [u8], ) -> Result<(), InvalidBufferSize>
Write result into the output buffer and reset the hasher state. Read more
Source§impl<T> Write for RtVariableCoreWrapper<T>where
T: VariableOutputCore + UpdateCore,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
Available on crate feature std
only.
impl<T> Write for RtVariableCoreWrapper<T>where
T: VariableOutputCore + UpdateCore,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
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 RtVariableCoreWrapper<T>where
T: VariableOutputCore + HashMarker,
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
Auto Trait Implementations§
impl<T> Freeze for RtVariableCoreWrapper<T>
impl<T> RefUnwindSafe for RtVariableCoreWrapper<T>where
T: RefUnwindSafe,
<<T as BlockSizeUser>::BlockSize as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
<T as BufferKindUser>::BufferKind: RefUnwindSafe,
impl<T> Send for RtVariableCoreWrapper<T>
impl<T> Sync for RtVariableCoreWrapper<T>
impl<T> Unpin for RtVariableCoreWrapper<T>where
T: Unpin,
<<T as BlockSizeUser>::BlockSize as ArrayLength<u8>>::ArrayType: Unpin,
<T as BufferKindUser>::BufferKind: Unpin,
impl<T> UnwindSafe for RtVariableCoreWrapper<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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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.