pub struct Endian<D, Bo> { /* private fields */ }Expand description
An adapter to provide digest functions with endian-awareness.
Implementations§
Source§impl<D, Bo> Endian<D, Bo>where
Bo: ByteOrder,
impl<D, Bo> Endian<D, Bo>where
Bo: ByteOrder,
Sourcepub fn byte_order_str() -> &'static str
pub fn byte_order_str() -> &'static str
Returns a string describing the byte order used by this
Endian type instance.
This is mainly used for debugging purposes. The user should not rely on any particular output.
Source§impl<D, Bo> Endian<D, Bo>
impl<D, Bo> Endian<D, Bo>
Sourcepub fn into_inner(self) -> D
pub fn into_inner(self) -> D
Consumes self and returns the underlying digest implementation.
Trait Implementations§
Source§impl<D, Bo> BlockInput for Endian<D, Bo>where
D: BlockInput,
impl<D, Bo> BlockInput for Endian<D, Bo>where
D: BlockInput,
type BlockSize = <D as BlockInput>::BlockSize
Source§impl<D, Bo> EndianInput for Endian<D, Bo>
impl<D, Bo> EndianInput for Endian<D, Bo>
Source§fn input_u8(&mut self, n: u8)
fn input_u8(&mut self, n: u8)
Feeds an unsigned 8-bit value into the digest function. Read more
Source§fn chain_u8(self, n: u8) -> Selfwhere
Self: Sized,
fn chain_u8(self, n: u8) -> Selfwhere
Self: Sized,
Digest an unsigned 8-bit value in a chained manner. Read more
Source§fn chain_i8(self, n: i8) -> Selfwhere
Self: Sized,
fn chain_i8(self, n: i8) -> Selfwhere
Self: Sized,
Digest a signed 8-bit value in a chained manner. Read more
fn input_u16(&mut self, n: u16)
fn chain_u16(self, n: u16) -> Selfwhere
Self: Sized,
fn input_i16(&mut self, n: i16)
fn chain_i16(self, n: i16) -> Selfwhere
Self: Sized,
fn input_u32(&mut self, n: u32)
fn chain_u32(self, n: u32) -> Selfwhere
Self: Sized,
fn input_i32(&mut self, n: i32)
fn chain_i32(self, n: i32) -> Selfwhere
Self: Sized,
fn input_u64(&mut self, n: u64)
fn chain_u64(self, n: u64) -> Selfwhere
Self: Sized,
fn input_i64(&mut self, n: i64)
fn chain_i64(self, n: i64) -> Selfwhere
Self: Sized,
fn input_f32(&mut self, n: f32)
fn chain_f32(self, n: f32) -> Selfwhere
Self: Sized,
fn input_f64(&mut self, n: f64)
fn chain_f64(self, n: f64) -> Selfwhere
Self: Sized,
Source§impl<D, Bo> FixedOutput for Endian<D, Bo>where
D: FixedOutput,
impl<D, Bo> FixedOutput for Endian<D, Bo>where
D: FixedOutput,
type OutputSize = <D as FixedOutput>::OutputSize
Source§fn fixed_result(self) -> GenericArray<u8, Self::OutputSize>
fn fixed_result(self) -> GenericArray<u8, Self::OutputSize>
Retrieve result and consume hasher instance.
Auto Trait Implementations§
impl<D, Bo> Freeze for Endian<D, Bo>where
D: Freeze,
impl<D, Bo> RefUnwindSafe for Endian<D, Bo>where
D: RefUnwindSafe,
Bo: RefUnwindSafe,
impl<D, Bo> Send for Endian<D, Bo>
impl<D, Bo> Sync for Endian<D, Bo>
impl<D, Bo> Unpin for Endian<D, Bo>
impl<D, Bo> UnwindSafe for Endian<D, Bo>where
D: UnwindSafe,
Bo: 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
type OutputSize = <D as FixedOutput>::OutputSize
Source§fn result(self) -> GenericArray<u8, <D as Digest>::OutputSize>
fn result(self) -> GenericArray<u8, <D as Digest>::OutputSize>
Retrieve result and consume hasher instance.
Source§fn result_reset(&mut self) -> GenericArray<u8, <D as Digest>::OutputSize>
fn result_reset(&mut self) -> GenericArray<u8, <D as Digest>::OutputSize>
Retrieve result and reset hasher instance. Read more
Source§fn output_size() -> usize
fn output_size() -> usize
Get output size of the hasher
Source§fn digest(data: &[u8]) -> GenericArray<u8, <D as Digest>::OutputSize>
fn digest(data: &[u8]) -> GenericArray<u8, <D as Digest>::OutputSize>
Convenience function to compute hash of the
data. It will handle
hasher creation, data feeding and finalization. Read moreSource§impl<D> DynDigest for D
impl<D> DynDigest for D
Source§fn result_reset(&mut self) -> Box<[u8]>
fn result_reset(&mut self) -> Box<[u8]>
Retrieve result and reset hasher instance
Source§fn output_size(&self) -> usize
fn output_size(&self) -> usize
Get output size of the hasher