Trait digest_hash::EndianInput
[−]
[src]
pub trait EndianInput: Input { type ByteOrder: ByteOrder; fn process_u8(&mut self, n: u8) { ... } fn process_i8(&mut self, n: i8) { ... } fn process_u16(&mut self, n: u16) { ... } fn process_i16(&mut self, n: i16) { ... } fn process_u32(&mut self, n: u32) { ... } fn process_i32(&mut self, n: i32) { ... } fn process_u64(&mut self, n: u64) { ... } fn process_i64(&mut self, n: i64) { ... } fn process_f32(&mut self, n: f32) { ... } fn process_f64(&mut self, n: f64) { ... } }
Extends digest::Input
to provide primitives for type-safe hashing.
EndianInput
provides methods to process machine-independent values
of bit widths larger than 8 bit. The values are serialized with the
byte order which is defined in the associated type ByteOrder
.
Associated Types
type ByteOrder: ByteOrder
The byte order this implementation provides.
This type binding determines the "endianness" of how integer and floating-point values are serialized by this implementation towards computation of the digest.
Provided Methods
fn process_u8(&mut self, n: u8)
Feeds an unsigned 8-bit value into the digest function.
This method is agnostic to the byte order, and is only provided for completeness.
fn process_i8(&mut self, n: i8)
Feeds a signed 8-bit value into the digest function.
This method is agnostic to the byte order, and is only provided for completeness.