Struct crc32fast::Hasher [−][src]
pub struct Hasher { /* fields omitted */ }
Represents an in-progress CRC32 computation.
Implementations
impl Hasher
[src]
impl Hasher
[src]pub fn new() -> Self
[src]
Create a new Hasher
.
This will perform a CPU feature detection at runtime to select the most optimal implementation for the current processor architecture.
pub fn new_with_initial(init: u32) -> Self
[src]
Create a new Hasher
with an initial CRC32 state.
This works just like Hasher::new
, except that it allows for an initial
CRC32 state to be passed in.
pub fn update(&mut self, buf: &[u8])
[src]
Process the given byte slice and update the hash state.
pub fn finalize(self) -> u32
[src]
Finalize the hash state and return the computed CRC32 value.
pub fn reset(&mut self)
[src]
Reset the hash state.
pub fn combine(&mut self, other: &Self)
[src]
Combine the hash state with the hash state for the subsequent block of bytes.
Trait Implementations
impl Hasher for Hasher
[src]
impl Hasher for Hasher
[src]