Struct digest_hash::Endian
[−]
[src]
pub struct Endian<D, Bo> { /* fields omitted */ }
An adapter to provide digest functions with endian-awareness.
Methods
impl<D, Bo> Endian<D, Bo> where
Bo: ByteOrder,
[src]
Bo: ByteOrder,
fn byte_order_str() -> &'static str
[src]
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.
impl<D, Bo> Endian<D, Bo> where
D: Input,
D: Default,
Bo: ByteOrder,
[src]
D: Input,
D: Default,
Bo: ByteOrder,
fn new() -> Self
[src]
Constructs an instance of an endian-aware hasher.
Examples
let hasher = digest_hash::BigEndian::<Sha256>::new();
impl<D, Bo> Endian<D, Bo>
[src]
fn into_inner(self) -> D
[src]
Consumes self and returns the underlying digest implementation.
Trait Implementations
impl<D: Clone, Bo: Clone> Clone for Endian<D, Bo>
[src]
fn clone(&self) -> Endian<D, Bo>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<D, Bo> Debug for Endian<D, Bo> where
D: Debug,
Bo: ByteOrder,
[src]
D: Debug,
Bo: ByteOrder,
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter.
impl<D, Bo> EndianInput for Endian<D, Bo> where
D: Input,
Bo: ByteOrder,
[src]
D: Input,
Bo: ByteOrder,
type ByteOrder = Bo
The byte order this implementation provides. Read more
fn process_u8(&mut self, n: u8)
[src]
Feeds an unsigned 8-bit value into the digest function. Read more
fn process_i8(&mut self, n: i8)
[src]
Feeds a signed 8-bit value into the digest function. Read more
fn process_u16(&mut self, n: u16)
[src]
fn process_i16(&mut self, n: i16)
[src]
fn process_u32(&mut self, n: u32)
[src]
fn process_i32(&mut self, n: i32)
[src]
fn process_u64(&mut self, n: u64)
[src]
fn process_i64(&mut self, n: i64)
[src]
fn process_f32(&mut self, n: f32)
[src]
fn process_f64(&mut self, n: f64)
[src]
impl<D, Bo> Input for Endian<D, Bo> where
D: Input,
[src]
D: Input,
fn process(&mut self, input: &[u8])
[src]
Digest input data. This method can be called repeatedly for use with streaming messages. Read more
impl<D, Bo> BlockInput for Endian<D, Bo> where
D: BlockInput,
[src]
D: BlockInput,
impl<D, Bo> FixedOutput for Endian<D, Bo> where
D: FixedOutput,
[src]
D: FixedOutput,
type OutputSize = D::OutputSize
fn fixed_result(self) -> GenericArray<u8, Self::OutputSize>
[src]
Retrieve the digest result. This method consumes digest instance.
impl<D, Bo> Default for Endian<D, Bo> where
D: Input,
D: Default,
Bo: ByteOrder,
[src]
D: Input,
D: Default,
Bo: ByteOrder,
impl<D, Bo> From<D> for Endian<D, Bo> where
D: Input,
Bo: ByteOrder,
[src]
D: Input,
Bo: ByteOrder,