Struct crc_any::CRC [−][src]
pub struct CRC { /* fields omitted */ }
This struct can help you compute a CRC value.
Methods
impl CRC
[src]
impl CRC
pub fn create_crc(
poly64: u64,
bits: u8,
initial: u64,
final_xor: u64,
reflect: bool
) -> CRC
[src]
pub fn create_crc(
poly64: u64,
bits: u8,
initial: u64,
final_xor: u64,
reflect: bool
) -> CRC
Create a CRC instance by providing the length of bits, expression, reflection, an initial value and a final xor value.
pub fn create_crc_with_exists_lookup_table(
lookup_table: [u64; 256],
bits: u8,
initial: u64,
final_xor: u64,
reflect: bool
) -> CRC
[src]
pub fn create_crc_with_exists_lookup_table(
lookup_table: [u64; 256],
bits: u8,
initial: u64,
final_xor: u64,
reflect: bool
) -> CRC
Create a CRC instance by providing an existing lookup table, the length of bits, expression, reflection, an initial value and a final xor value.
pub fn digest<T: ?Sized + AsRef<[u8]>>(&mut self, data: &T)
[src]
pub fn digest<T: ?Sized + AsRef<[u8]>>(&mut self, data: &T)
Digest some data.
pub fn get_crc(&mut self) -> u64
[src]
pub fn get_crc(&mut self) -> u64
Get the current CRC value (it always returns a u64 value). You can continue calling digest
method even after getting a CRC value.
pub fn get_crc_array(&mut self) -> ([u8; 8], usize)
[src]
pub fn get_crc_array(&mut self) -> ([u8; 8], usize)
Get the current CRC value (it always returns a ([u8; 8], usize) tuple, where the second value of the tuple means the actual length of this CRC value). You can continue calling digest
method even after getting a CRC value.
pub fn get_crc_vec(&mut self) -> Vec<u8>
[src]
pub fn get_crc_vec(&mut self) -> Vec<u8>
Get the current CRC value (it always returns a vec instance with a length corresponding to the CRC bits). You can continue calling digest
method even after getting a CRC value.
pub fn crc64iso() -> CRC
[src]
pub fn crc64iso() -> CRC
pub fn crc64ecma() -> CRC
[src]
pub fn crc64ecma() -> CRC
pub fn crc32ieee() -> CRC
[src]
pub fn crc32ieee() -> CRC
pub fn crc32mhash() -> CRC
[src]
pub fn crc32mhash() -> CRC
pub fn crc32c() -> CRC
[src]
pub fn crc32c() -> CRC
pub fn crc16ibm() -> CRC
[src]
pub fn crc16ibm() -> CRC
pub fn crc16ccitt() -> CRC
[src]
pub fn crc16ccitt() -> CRC
pub fn crc8atm() -> CRC
[src]
pub fn crc8atm() -> CRC
pub fn crc8cdma() -> CRC
[src]
pub fn crc8cdma() -> CRC