pub struct NoOpHasher;
Expand description
A digest::Digest
implementation which always returns the digest
[0;32]
.
Trait Implementations§
Source§impl Digest for NoOpHasher
impl Digest for NoOpHasher
Source§fn new_with_prefix(_data: impl AsRef<[u8]>) -> Self
fn new_with_prefix(_data: impl AsRef<[u8]>) -> Self
Create new hasher instance which has processed the provided data.
Source§fn chain_update(self, _data: impl AsRef<[u8]>) -> Self
fn chain_update(self, _data: impl AsRef<[u8]>) -> Self
Process input data in a chained manner.
Source§fn finalize_into(self, out: &mut Output<Self>)
fn finalize_into(self, out: &mut Output<Self>)
Write result into provided array and consume the hasher instance.
Source§fn finalize_reset(&mut self) -> Output<Self>where
Self: FixedOutputReset,
fn finalize_reset(&mut self) -> Output<Self>where
Self: FixedOutputReset,
Retrieve result and reset hasher instance.
Source§fn finalize_into_reset(&mut self, out: &mut Output<Self>)where
Self: FixedOutputReset,
fn finalize_into_reset(&mut self, out: &mut Output<Self>)where
Self: 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§impl FixedOutput for NoOpHasher
impl FixedOutput for NoOpHasher
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) -> GenericArray<u8, Self::OutputSize>
fn finalize_fixed(self) -> GenericArray<u8, Self::OutputSize>
Retrieve result and consume the hasher instance.
Source§impl FixedOutputReset for NoOpHasher
impl FixedOutputReset for NoOpHasher
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) -> GenericArray<u8, Self::OutputSize>
fn finalize_fixed_reset(&mut self) -> GenericArray<u8, Self::OutputSize>
Retrieve result and reset the hasher state.
Source§impl OutputSizeUser for NoOpHasher
impl OutputSizeUser for NoOpHasher
Auto Trait Implementations§
impl Freeze for NoOpHasher
impl RefUnwindSafe for NoOpHasher
impl Send for NoOpHasher
impl Sync for NoOpHasher
impl Unpin for NoOpHasher
impl UnwindSafe for NoOpHasher
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