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]
impl<D, Bo> Endian<D, Bo> where
Bo: ByteOrder,
pub fn byte_order_str() -> &'static str
[src]
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.
impl<D, Bo> Endian<D, Bo> where
D: Input,
D: Default,
Bo: ByteOrder,
[src]
impl<D, Bo> Endian<D, Bo> where
D: Input,
D: Default,
Bo: ByteOrder,
pub fn new() -> Self
[src]
pub fn new() -> Self
Constructs an instance of an endian-aware hasher.
Examples
let hasher = digest_hash::BigEndian::<Sha256>::new();
impl<D, Bo> Endian<D, Bo>
[src]
impl<D, Bo> Endian<D, Bo>
pub fn into_inner(self) -> D
[src]
pub fn into_inner(self) -> D
Consumes self and returns the underlying digest implementation.
Trait Implementations
impl<D: Clone, Bo: Clone> Clone for Endian<D, Bo>
[src]
impl<D: Clone, Bo: Clone> Clone for Endian<D, Bo>
fn clone(&self) -> Endian<D, Bo>
[src]
fn clone(&self) -> Endian<D, Bo>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<D, Bo> Debug for Endian<D, Bo> where
D: Debug,
Bo: ByteOrder,
[src]
impl<D, Bo> Debug for Endian<D, Bo> where
D: Debug,
Bo: ByteOrder,
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl<D, Bo> EndianInput for Endian<D, Bo> where
D: Input,
Bo: ByteOrder,
[src]
impl<D, Bo> EndianInput for Endian<D, Bo> where
D: Input,
Bo: ByteOrder,
type ByteOrder = Bo
The byte order this implementation provides. Read more
fn input_u8(&mut self, n: u8)
[src]
fn input_u8(&mut self, n: u8)
Feeds an unsigned 8-bit value into the digest function. Read more
fn input_i8(&mut self, n: i8)
[src]
fn input_i8(&mut self, n: i8)
Feeds a signed 8-bit value into the digest function. Read more
fn chain_u8(self, n: u8) -> Self where
Self: Sized,
[src]
fn chain_u8(self, n: u8) -> Self where
Self: Sized,
Digest an unsigned 8-bit value in a chained manner. Read more
fn chain_i8(self, n: i8) -> Self where
Self: Sized,
[src]
fn chain_i8(self, n: i8) -> Self where
Self: Sized,
Digest a signed 8-bit value in a chained manner. Read more
fn input_u16(&mut self, n: u16)
[src]
fn input_u16(&mut self, n: u16)
fn chain_u16(self, n: u16) -> Self where
Self: Sized,
[src]
fn chain_u16(self, n: u16) -> Self where
Self: Sized,
fn input_i16(&mut self, n: i16)
[src]
fn input_i16(&mut self, n: i16)
fn chain_i16(self, n: i16) -> Self where
Self: Sized,
[src]
fn chain_i16(self, n: i16) -> Self where
Self: Sized,
fn input_u32(&mut self, n: u32)
[src]
fn input_u32(&mut self, n: u32)
fn chain_u32(self, n: u32) -> Self where
Self: Sized,
[src]
fn chain_u32(self, n: u32) -> Self where
Self: Sized,
fn input_i32(&mut self, n: i32)
[src]
fn input_i32(&mut self, n: i32)
fn chain_i32(self, n: i32) -> Self where
Self: Sized,
[src]
fn chain_i32(self, n: i32) -> Self where
Self: Sized,
fn input_u64(&mut self, n: u64)
[src]
fn input_u64(&mut self, n: u64)
fn chain_u64(self, n: u64) -> Self where
Self: Sized,
[src]
fn chain_u64(self, n: u64) -> Self where
Self: Sized,
fn input_i64(&mut self, n: i64)
[src]
fn input_i64(&mut self, n: i64)
fn chain_i64(self, n: i64) -> Self where
Self: Sized,
[src]
fn chain_i64(self, n: i64) -> Self where
Self: Sized,
fn input_f32(&mut self, n: f32)
[src]
fn input_f32(&mut self, n: f32)
fn chain_f32(self, n: f32) -> Self where
Self: Sized,
[src]
fn chain_f32(self, n: f32) -> Self where
Self: Sized,
fn input_f64(&mut self, n: f64)
[src]
fn input_f64(&mut self, n: f64)
fn chain_f64(self, n: f64) -> Self where
Self: Sized,
[src]
fn chain_f64(self, n: f64) -> Self where
Self: Sized,
impl<D, Bo> Input for Endian<D, Bo> where
D: Input,
[src]
impl<D, Bo> Input for Endian<D, Bo> where
D: Input,
fn input<B: AsRef<[u8]>>(&mut self, data: B)
[src]
fn input<B: AsRef<[u8]>>(&mut self, data: B)
Digest input data. Read more
fn chain<B>(self, data: B) -> Self where
B: AsRef<[u8]>,
[src]
fn chain<B>(self, data: B) -> Self where
B: AsRef<[u8]>,
Digest input data in a chained manner.
impl<D, Bo> BlockInput for Endian<D, Bo> where
D: BlockInput,
[src]
impl<D, Bo> BlockInput for Endian<D, Bo> where
D: BlockInput,
impl<D, Bo> FixedOutput for Endian<D, Bo> where
D: FixedOutput,
[src]
impl<D, Bo> FixedOutput for Endian<D, Bo> where
D: FixedOutput,
type OutputSize = D::OutputSize
fn fixed_result(self) -> GenericArray<u8, Self::OutputSize>
[src]
fn fixed_result(self) -> GenericArray<u8, Self::OutputSize>
Retrieve result and consume hasher instance.
impl<D, Bo> Reset for Endian<D, Bo> where
D: Reset,
[src]
impl<D, Bo> Reset for Endian<D, Bo> where
D: Reset,
impl<D, Bo> Default for Endian<D, Bo> where
D: Input,
D: Default,
Bo: ByteOrder,
[src]
impl<D, Bo> Default for Endian<D, Bo> where
D: Input,
D: Default,
Bo: ByteOrder,
impl<D, Bo> From<D> for Endian<D, Bo> where
D: Input,
Bo: ByteOrder,
[src]
impl<D, Bo> From<D> for Endian<D, Bo> where
D: Input,
Bo: ByteOrder,