[−][src]Struct crc::crc64::Digest
Digest
struct for CRC calculation
table
: Calculation table generated from input parameters.initial
: Initial value.value
: Current value of the CRC calculation.final_xor
: Final value to XOR with when callingDigest::sum64()
.calc
: Type of calculation. See its documentation for details.
Methods
impl Digest
[src]
pub fn new(poly: u64) -> Digest
[src]
Creates a new Digest from input polynomial.
Example
use crc::{crc64, Hasher64}; let mut digest = crc64::Digest::new(crc64::ECMA); digest.write(b"123456789"); assert_eq!(digest.sum64(), 0x995dc9bbdf1939fa);;
pub fn new_with_initial(poly: u64, initial: u64) -> Digest
[src]
Creates a new Digest from input polynomial and initial value.
Example
use crc::{crc64, Hasher64}; let mut digest = crc64::Digest::new_with_initial(crc64::ECMA, 0u64); digest.write(b"123456789"); assert_eq!(digest.sum64(), 0x995dc9bbdf1939fa);
pub fn new_custom(
poly: u64,
initial: u64,
final_xor: u64,
calc: CalcType
) -> Digest
[src]
poly: u64,
initial: u64,
final_xor: u64,
calc: CalcType
) -> Digest
Creates a fully customized Digest from input parameters.
Example
use crc::{crc64, Hasher64}; let mut digest = crc64::Digest::new_custom(crc64::ECMA, !0u64, !0u64, crc::CalcType::Reverse); digest.write(b"123456789"); assert_eq!(digest.sum64(), 0x995dc9bbdf1939fa);
Trait Implementations
impl Hasher64 for Digest
[src]
impl Hasher for Digest
[src]
fn finish(&self) -> u64
[src]
fn write(&mut self, bytes: &[u8])
[src]
fn write_u8(&mut self, i: u8)
1.3.0[src]
fn write_u16(&mut self, i: u16)
1.3.0[src]
fn write_u32(&mut self, i: u32)
1.3.0[src]
fn write_u64(&mut self, i: u64)
1.3.0[src]
fn write_u128(&mut self, i: u128)
1.26.0[src]
fn write_usize(&mut self, i: usize)
1.3.0[src]
fn write_i8(&mut self, i: i8)
1.3.0[src]
fn write_i16(&mut self, i: i16)
1.3.0[src]
fn write_i32(&mut self, i: i32)
1.3.0[src]
fn write_i64(&mut self, i: i64)
1.3.0[src]
fn write_i128(&mut self, i: i128)
1.26.0[src]
fn write_isize(&mut self, i: isize)
1.3.0[src]
Auto Trait Implementations
impl Send for Digest
impl Sync for Digest
impl Unpin for Digest
impl UnwindSafe for Digest
impl RefUnwindSafe for Digest
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,